Although I found one post that suggested backing up the hub database using Insteon Terminal, doing a factory reset of the hub, and then restoring the database, I decided to play it safe and manually unlink everything - I do not have a spare hub and Insteon equipment is getting expensive.
The unlinking process often left link records in either the hub or the devices, even after multiple unlink attempts. Often, the Insteon Terminal removeController/removeResponder (on the device) or removeResponderOrController (on the hub) commands would clear the links. Some were stubborn but a removeDevice worked. I had a motion sensor that was still linked to an Insteon PLM (long gone) and none of these commands worked - I ended up factory resetting the motion sensor.
I then linked each of the devices to the hub, first initiating the links from the hub, and then from the device. The hub and device databases were now clean without any duplicated links or groups.