if you want to do it via code, you could take a couple of approaches:
this removes all images in the blender file:
import bpy # iterate over all images in the file for image in bpy.data.images: # don't do anything if notthe image has any users. if image.users: continue # remove the image otherwise bpy.data.images.remove(image) You also have the option to make this into a method that you can just pass the image to that you want to delete:
def cleanDataBlockclean_data_block(block): # iterate over every entry in the data block for data in block: # if notthe data block has any users, don't do anything if data.users: continue # otherwise remove the data block block.remove(data) in this case you would clean the images that were not used by using:
cleanDataBlockclean_data_block(bpy.data.images)