How to delete materials completely?

Hi again, I have append few objects into my current scene and there are a lot of materials I want to delete. How do I delete them? There is no delete button in Material Panel? There is this x button but it just putting away the material and not deleting it. Oh current version of blender is 2.5

Make sure unrequered material have no users (those will have a cyrcle near the name in materials list).
Save scene.
Reopen it.
This simple action will purge unused datablocks.

ps. And there is a function to keep materials datablocks even without users - small “F” button near each material namefiled. Make sure it is not pressed, otherwise nothing will happen to “forced to keep” ones.

You shiftclick the [-] button in the material tab in 2.5
It force removes the material on the next save no matter the usage.
But IIRC it stays persistant in the memory until you reopen the file.

so basically you cant delete the material at all?

You can.

A material is linked to a datablock.
If you got 4 cubes in your scene with the same material, its one material, with 4 datablocks using it… “4 users”

If you delete the material from one object, you don´t delete the material, you just unlink it from the datablock.
So the material stays in the file.

If you unlink (remove) it from all objects (datablocks) and save the file, it is gone on the next load because there are no users, so the material gets discarded unless you applied a fakuser (the F)

If you shift-remove the material, you force remove it.
You don´t have to remove the material from all datablocks in order to have it removed from the file. It simply removes the datalink between object<>material.
I don´t know the actual code, but I guess due to zero pointer prevention and memory management reasons the material is not instantly removed, it stays in the systems memory until you reload the file.

Once you reload the file, the material is gone completely and all objects that had this material linked got no material assigned anymore.

aaaaah now I understand. It should have a delete button delete the selected material easily. How could I know of you have to shift click and save the scene and reload again. It is just crazy. Well now I know it, thanks a lot!!!

The button tooltip tells you =)