Response file uninstall basics

You can use a response file to uninstall one or more Db2® database products, features, or languages. A response file uninstall can also be referred to as a silent uninstall or an unattended uninstall.

On Linux® and UNIX operating systems, you can also use a response file to uninstall the Db2 Information Center.

A sample uninstall response file, db2un.rsp, is provided. When the Db2 database product was installed, as part of the installation the sample uninstall response file is copied to DB2DIR/install, where DB2DIR specifies the path where the Db2 database product was installed. You can customize the response file. To activate a keyword in the response file, remove the asterisk (*) to the left of the keyword.

Before uninstalling using a response file, the following considerations, and restrictions, must be considered.

When removing a Db2 database product, you must first drop the Db2 instance. For example, if only Db2 ESE is installed, before removing the ESE product you must first drop the instance.

If multiple Db2 database products exist within the same Db2 copy, a response file uninstallation of one Db2 database product does not affect the components shared by other Db2 database products in that copy.

For example, DB2COPY1 contains the Db2 database products ESE, WSE and PE. Several components are shared among the three products. In this case, uninstalling ESE removes the components that are not shared. In the following figure, the shaded region represents the components to be removed from DB2COPY1:
Figure 1. Shared components among different Db2 database products within the same copy
This figure shows shared components among different Db2 database products within the same copy
However, before removing a Db2 database product, consider the instance type. For example, ESE, WSE and PE are installed in the same Db2 copy. You want to remove the ESE product. Before removing the ESE product, you can either:
  • move the instance to another Db2 copy of the same version that supports the ESE instance type using the db2iupdt command, or,
  • remove the existing ESE instance using the db2idrop command.

If a Db2 feature is installed by multiple products in the same Db2 copy, a response file uninstallation of the feature removes the feature from all of the products in the Db2 copy.

The following restrictions apply:
  • A Db2 database product cannot be removed if that product is required by an add-on product. For example, if both ESE and QP are installed, ESE cannot be uninstalled.
  • A Db2 feature cannot be removed if that feature is required by another feature.
  • The language English cannot be removed.
  • On Windows operating systems:
    • When you are removing a Db2 database product, the uninstall response file cannot also contain the keywords to remove a feature or a language. The keyword REMOVE_PROD cannot be combined with keywords REMOVE_COMP or REMOVE_LANG.
    • If you have a clustered environment, before uninstalling your Db2 database product you must run the db2mscs command, with the -u option, from the same server that originally ran the db2mscs command to create the failover infrastructure. For details, see the db2mscs command.
After a response file uninstall, check the log file. This file captures all Db2 uninstallation information, including errors.
  • On Linux and UNIX operating systems, the log file is located in /tmp/db2_deinstall-nnnnn.log where nnnnn are generated numbers. The log file name displays on the screen after running the db2_deinstall command. You can also verify the product, feature, or language was removed using the db2ls command.
  • On Windows operating systems, the log file is located in My Documents\DB2LOG\db2un-TimeStamp.log. You can verify the product, feature, or language was removed by opening the Add/Remove Programs dialog in the control panel.