Not really. You can probably find some script that consolidates everything into specific structures for easier deletion, but ultimately AE has no way of what you want to keep and what not, how specific nested comps interact, how blending modes, parenting, expressions, track mattes reference other items and so on. Too many complicated dependencies that even a complex script cannot necessarily resolve. If that's really important to you, it would be much bettter to already set up your projects with reusability in mind and structure them accordingly.
I find it difficult to delete all the footage after every project and then save the project with all the layers that I don't necessarily need
1. select the comp/the elements you want to keep in the project panel
2. file->dependencies->reduce project
3. save a copy
Thank you for getting back to me, these files I made were made before a time I thought of using them again. Currently I'm making some of them in illustrator, but some have specific creations that rely on animation. Thank you again for the advice, I will keep reusability in mind.
Thank you so very much, this is just what I needed. *Gives you a hug across the internet*
You are welcome!