Automatic cleanup and compression of repositories