How can I remove all unused materials from a .blend file? I'm testing different materials in the same object, and finally the file has a lot of unnecessary material, is there any command  that performs the cleaning of these materials automatically? in short, is it possible to make them disappear from the file?
After unlinking your materials, save your file. Then reload it with Ctrl+Shift+O.