script to edit contents of a Blend file??

Sometimes i have found it is useful to remove assets (and references to assets) from a blend file is there a script that can do this??

Im looking in particular for a way to remove materials and textures from a blend (right now i have a blend file with normal map textures?? that i would like to remove completely).

any hints??

and these are NOT orphans just unneeded/unwanted

someone was working on a blender asset manager that i think could do this…
not sure what happened to it. i too like to find a nice way to “clean” a blend file.

here is a link to a roadmap that talked about asset manager

Blender 2.7x projectsAsset manager, better UI and tools for handling linkage

This normal textures are embeded or not?
If yes, you must save it on your desktop and remove the texture socket only.
close Blender and when you re open it, the texture must to be removed normally, no?