Database Cleanup

Is anyone aware of any C# or SQL scripts to perform a database cleanup? Looking to compact the data set of things like old log entries, unused data types, unused doc types, old/unused content versions, etc.


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/98342-database-cleanup