As part of server decommissioning, cleanup of old DB2 product, you might need to uninstall DB2. In this blog we will go through steps to uninstall DB2 on Linux.
Step 1: Verify DB2 instance association with DB2 product
You can use db2ilist command and execute it from <DB2 Installation Path>/instance with root privilege to get DB2 instance associated with that DB2 installation
./db2ilist
If there is no DB2 instance associated with it then skip next step
Step 2: Drop DB2 instance associated with DB2 installation
Execute db2idrop command from <DB2 Installation Path>/instance with root privilege to drop DB2 instance. Ensure there is no local database associated with DB2 instance and instance is in stop state.
./db2idrop <instanceid>
db2idrop throws error The specified instance "<instanceid>" does not exist then follow blog db2idrop issue : The specified instance does not exist
Step 3: Uninstall DB2 product
Change current working directory to <DB2 Installation Path>/install and execute db2_deinstall with root privilege to uninstall DB2.
./db2_deinstall -a
If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email.
Very helpful
ReplyDeleteThanks!
Thanks..keep visiting :)
DeleteVery helpful.
ReplyDeleteThanks!
Thanks..keep visiting :)
DeleteThanks for providing such type of straight forward info. This is really helpful to real time experince people.
ReplyDeleteHi Sumit,
ReplyDeletePost upgrade from 11.1 to 11.5, can we remove the 11.1 binaries using db2_deinstall . What would be the steps to do so?
Once done with the upgrade and you have verified everything is working fine, you can go ahead and uninstall older DB2 version installation. It is recommended to uninstall older version installation to keep your DB server free from vulnerable code base. To do so follow steps mentioned in this blog.
Delete