DB2 10.5 for Linux, UNIX, and Windows

db2unins - Uninstall DB2 database products, features, or languages command

Uninstalls one or more DB2® database products, features, or languages.

db2unins can be found both in the installation media and in a DB2 install copy on the system. If run from the installation media, only the -f, -l, -t and -? parameters can be used. If run from a DB2 install copy, all the options except -f can be used.

Authorization

SYSADM

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-db2unins--+------------------------------------------+------->
             +- -d--------------------------------------+   
             +- -f--------------------------------------+   
             '-+---------------+-+--------------------+-'   
               '- -p--products-' '- -u--response-file-'     

>--+---------------+--+-----------------+--+-----+--+-----+----><
   '- -l--log-file-'  '- -t--trace-file-'  '- -y-'  '- -?-'   

Command parameters

Note:

On Windows operating systems, the db2unins command can use the / or - switch symbols interchangeably.

Running the db2unins command without any of the -?, -d, -p or -u parameters will result in the removal of all DB2 database products under the current installation directory.

-d
Displays the products that are installed in the current DB2 copy on the system. This option is only available when executed from an installed copy of a DB2 database product.
-f
Performs a brute force uninstallation of all DB2 database products on the system. The db2unins -f command can only be issued from the installation media. Your system will reboot when you successfully issue db2unins -f. It can only be issued if there are no other DB2 products before version 9 installed on the system.
-p products
Specifies the products to be uninstalled. This parameter is only available when run from an installed DB2 copy. To uninstall multiple products, separate a list of products by a semicolon and enclosed in double quotation marks. When both parameters -p and -u are specified, the products specified in -p override the products specified in the response file. For example, db2unins -p "SERVER;QP" -u db2un.rsp uninstalls both DB2 SERVER and QP regardless of the REMOVE_PROD keyword value in db2un.rsp.
-u response-file
Performs an uninstallation of products, features, or languages based on what is specified in the response file. For example, db2unins -u db2un.rsp. This parameter is only available when run from an installed DB2 copy. If both parameters -p and -u are specified, the DB2 products specified in the -p parameter override the REMOVE_PROD keyword in the response file.
If you have a clustered environment, before uninstalling your DB2 product using a response file, you must first 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.
-l log-file
Specifies the location of the log file. The default log file location is My Documents\DB2LOG\db2un_<timestamp>.log.
-t trace-file
Turns on the trace functionality. The trace file will be used for debugging problems with the db2unins command.
-y
Ensures that no confirmation is done during the uninstallation process.
-?
Displays help for the db2unins command.

Usage notes