Deleting Materials linked to hundreds of objects?

I loaded up a file that has almost 100 objects in it. They are linked to 10 different materials.
I would like to delete these 10 materials.
Is there an easy way to do this?
For some reason, the only thing I can think of requires me to go object to object and click that X button on the material.
Then… save the file, quit Blender and re-load it to flush out all these unlinked materials.
Sigh… please tell me there’s another way.

try this,

select one object, delete all the materials then create a default material and assign it. now select all the other objects, right click the new grey object to make it the acive object and press ctrl L for the make links menu and select materials. now you should only have the one material to deal with when it comes to texturing your objects

Press on the X button of the material but with shift-key pressed. Just hovering over the button gives the following text: “Unlink Datablock (Shift + Click to set users to zero, data will then not be saved)”.
Then just save and reload the file, the material is gone.

Nice tip Markus, didn’t know this!

me niether! been using it a lot today thanks :slight_smile: