implement database-cleaning for uninstalled packages