Cleaning up blender data

I have a blender scnene with a couple of mesh objects, two armatures and each mesh have some materials. However, many things lead to this point and now blender shows a lot of materials and bones that should not exist anymore. How can I permanently remove this kind of data so that blender wont show them again? Mostly annoying is that, in the action editor, blender shows some bones that I have long “deleted”.

  • Thanks.