Hi @tobias_wiesendanger. Is it a sheet metal part, or a regular part? I don't think you can delete a material while that material is the 'active' one for the part document, even if it has not been applied to anything within the document, due to there not being any model to apply it to. Also, since materials contain data about the material, its appearance, and its physical attributes, I believe that if there is an appearance in the documents appearances that belongs to a material, you will not be able to delete the material from the document materials, before you delete the associated appearance from the document appearances. Try purging the appearances thoroughly, before trying to purge the materials. Have you tried using the Purge tool on the Manage tab > Styles and Standards panel for this task?
I went through these same struggles myself at one point, and likely so did the majority of others. It can be pretty confusing/difficult trying to effectively get rid of appearances, materials, and especially drawing styles out of documents, because it can be difficult figuring out where they are being used or by what. In sheet metal parts, you have to consider your sheet metal rules contained in the document, which reference materials. In weldment type assemblies, even though they don't technically contain materials, they have default material for welds, if you create any. In drawings, there are title blocks, borders, sketch symbols, default styles, and styles that reference other styles, and the list goes on.
Wesley Crihfield

(Not an Autodesk Employee)