delete USED Materials

If you have USED materials in the library, it is because they are applied somewhere. you cannot remove them, you need to apply something else instead.
Do a muti slection of the materials you want to remove in the material editor, and drag another material from the library on it (in one move). They will all be replaced by the DUMMY material