How do you delete a material?

How can you do this so that extra materials that you no longer need are completely erased and don’t show up in the Data Block Menu?

when they aren’t used, any datablock will show up with a 0 left of the name

when this happens, they are not saved with the file

so, if you save [control+w] and reload [control+o] they will disappear

this is true not only of materials, but also of meshes and ipos and such

actions are somewhat an exception because by default they have a fake user [indicated by an F in the same spot]

so, to delete them you must go into the data select window [the shortcut for which if any escapes me right now], select them, press F [to remove the fake user], then save and reload.

How hard is it just to click the little x?

kansas_15 - you don’t understand!

they will stay in the data block even after clicking delete! so to remove them from the data block you must reload! try it :

create a mesh
create a material
delete the material
go to add a new material but pull down the menu - he material is still there!

As others have just said… Blender does not delete things that are unused. What it does do, is to elect not to save those things which have a zero reference-count, unless you stipulate otherwise. You won’t see anything disappear until you save, and then reload.

The reasoning for this is simple: suppose you assigned a new wood-material to the wrong object. You solve the problem by removing all references to the wood from the old object, and then, in a separate step, assign it to the new one. You wouldn’t be too happy if, the moment the last reference was removed, the material vanished.

You also wouldn’t be happy if you were trying to create a library of materials, as workers in big projects often do. These are blend-files that contain nothing but materials, all with no-owners, all flagged to “keep me around anyway.”