# How do I completely remove an image from my .blend file?

I'm creating a model for a 3D game that will eventually be exported using a custom Python script. This model makes heavy use of UV textures.

However, the project now references a bunch of images that are not used by any objects in the project. Example:

I don't want the first two, or the red_bubble.png image. However, I have no idea how to remove them from the project. Selecting one of them reveals that there are "2 users of the data" although I am not using it anywhere.

How can I get rid of these excess images?

If you have an image (or other piece of data, such as a material) you can force remove all users by Shift clicking on the X next to it's name. This will "mark" the data for removal upon closing the file.

After you force remove the data, you'll need to reopen the file in order for the data to be removed. You can do this quickly by saving the file with CtrlS and then opening it with CtrlShiftO and selecting the file.

• "You can do this quickly with Ctrl + Shift + O" make sure to run a Ctrl + S first. – wchargin Aug 11 '13 at 20:53
• Is there no way to delete the data without reopening the file? – Justin Jul 9 '14 at 16:49
• I do this much times, but my image still keeps there. As I imported it, it appears to disable me from saving as runtime game!!! – Adrians Netlis Dec 19 '14 at 12:58
• When I press that X button, that image file does not appear 0 on side. Is there way to change link of that image? It locks me all the time:( – Adrians Netlis Dec 19 '14 at 13:04

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 the 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 clean_data_block(block):
# iterate over every entry in the data block
for data in block:

# if the 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:

clean_data_block(bpy.data.images)

• I've tried this running the script inside a text editor in Blender, however it won't get rid of ones like these: bpy.context.area.type = 'CONSOLE' Path 'C:\Users\Richard\Documents\makehuman\v1\exports\textures\classicshoes_texture_diffuse.png' cannot be made relative – Richard Griffiths Jun 12 '17 at 6:48

For 2.8x

In the outliner look for Orphan Data. Unused images will show up there. Select and delete:

For Previous versions:

You can do that by going to Outliner, then chose to display Blender File.

Then right clicking on the image you want to remove and pressing delete.

Removing the "users" of the image may not be sufficient, e.g. after doing the steps listed in the selected answer and even deleting the image file, image Stone texture.jpg was still used by an also unused texture:

If the selected answer method doesn't remove the image, then you may try to also click the "X" of the texture which has been linked to the image at some point.

The logic behind this is obscure to me. After breaking the parenting links between "users" of the image and the image, the texture shouldn't list it as a child, but it does.

The convoluted "node-based" design of Blender is indeed not user-friendly.

• Deleting the image file can not and will not tell anything Blender as it can't know what were you doing with files in OS. Removing with Shift+X will remove the datablock on which Shift+X was executed. Image file in this case is another datablock. Using Purge All you can do that without reload, but in 2 steps. – Mr Zak Jun 9 '18 at 11:15
• @MrZak: Thanks for the additional explanations, the main point however is that it worked for me to unlink a reluctant image node, as explained. – mins Jun 9 '18 at 13:52