Uninstall DB2 on Linux

 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

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 error

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

uninstall DB2 on linux

uninstall db2 on linux



If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email.

6 comments: