Unable to delete libraries

Here is an alternative approach, which uses an older backup copy of the database. However, this can only work if the backups are not corrupt themselves.