Uninstalling DB2 Express-C is a bit more detailed than the installation process. Unfortunately, at this time, there is no GUI-based uninstaller utility like there is for installation. Follow the steps below to completely remove the DB2 Express-C software from your system. Since the database files are kept in the home directory of the instance user, you can keep the database files by skipping the removal of the instance owner (the last step).
Remove the Database Administration Server. Switch to the DAS owner (dasusr1 by default), either through the su - dasusr1 command or by logging in to the system directly as the DAS user, and issue the command db2admin stop. Then switch to the root user, and issue the /opt/ibm/db2/V9.1/instance/dasdrop command.
Remove the DB2 instance(s). Switch to the instance owner (db2inst1 by default), either through the su - db2inst1 command or by logging in to the system directly as the instance user, and issue the command db2stop. Then, as root, remove the instance by issuing the /opt/ibm/db2/V9.1/instance/db2idrop db2_instance command, where db2_instance refers to the actual instance name you want to drop (for example, /opt/ibm/db2/V9.1/instance/db2idrop db2inst1). If you want to verify which instances are present on your system, run the /opt/ibm/db2/V9.1/instance/db2ilist command.
Remove the software installation. As root, run the /opt/ibm/db2/V9.1/install/db2_deinstall -a command. This will remove the installation of DB2 from your system.
If no longer need the DB2 database files (which are kept in the home directory of the instance owner), you can remove the users that were created during the installation of DB2 Express-C by entering these commands as root:
userdel -r db2inst1 userdel -r dasusr1 userdel -r db2fenc1 |