Deleting Unreferenced Files

I was wondering why my DT file was getting so large so I looked through the files folder in the package contents and found files that are no longer referenced in DT. Is there a safe way to delete these files through DT? I was hoping there was a script that would delete unreferenced files, but I couldn’t find one.

*Update:
I took everything in the database and exported it. I then created a new database and imported all the data back in. The file size was 885 megs. The original with the unreferenced files was 2.5 gigs!

Ex- and importing is indeed the only possibility right now.

So out of curiosity, how would files become unreferenced in the database?

For example when the applications crashes or when the user uses “Force Quit”. And finally there were bugs in the past that could cause this.