I suppose you could just copy the metadata.db and cover.jpg files into a new folder, and treat that as a library. It would still record the formats as existing, but they would be "missing" formats, so anyone trying to download them would get an error.
Also keep in mind, the library is scriptable via the commandline `
calibredb` backend. cf. the subcommands "restore_database" or "remove_format". (The "check_library" subcommand does not appear to have an option to fix the things it reports on.)