If a mod unique id is still listed in mods.json shouldn't it just keep the previous state in database.json?
Proposing that the action should never delete a mod from the db unless it was also removed from mods.json, even if it can't find the mod. In that case just don't update the info. The current implementation results in mods becoming unobtainable via the manager.