Errors when running the db2_deinstall command in a partitioned database environment set up
Errors can occur if you run the db2_deinstall command after successful db2idrop operation of a partitioned database environment instance.
db2_deinstall may fail with the error message The deinstallation process cannot continue while there are Db2 instances related to the current Db2 copy. If you need to move up or down a level from this Db2 level, use the installFixPack command from the Db2 image for the level you desire to move to, which will update this copy. If you are only trying to uninstall this Db2 copy, you must either drop the related instance(s) <instance name> first, or you can update the instances to another Db2 copy which is at the same version as this Db2 copy, then restart the db2_deinstall command.
A possible cause of the issue is that the cleanup of the Db2® instance(s) profile in the registry was either incomplete or was interrupted during the db2idrop processing. This registry entry is looked up by db2_deinstall before the uninstallation.
Resolving the problem
/opt/ibm/db2/<release>/instance/db2iset -d <instance name>