5 Removing Oracle Database Client Software

This chapter describes how to completely remove the Oracle software and configuration files related to the specified Oracle home using the Deinstallation Tool.

The deinstallation tool removes the Oracle Database Client installations.

Oracle recommends that you use the deinstallation tool to remove the entire Oracle home associated with the Oracle Database, Oracle Clusterware, Oracle ASM, Oracle RAC, or Oracle Database client installation. Oracle does not support the removal of individual products or components.

It includes information about the following topics:

Caution:

You must use the deinstallation tool from the same release to remove Oracle software. Do not run the deinstallation tool from a later release to remove Oracle software from an earlier release. For example, do not run the deinstallation tool from the 12.1.0.1 installation media to remove Oracle software from an existing 11.2.0.4 Oracle home.

5.1 About the Deinstallation Tool

Starting with Oracle Database 12c Release 1 (12.1), the deinstallation tool is integrated with Oracle Universal Installer (OUI). You can run the deinstallation tool using the setup.exe command with the -deinstall and -home options from the base directory of the Oracle Database, Oracle Database Client, or Oracle Grid Infrastructure installation media.

The Deinstallation Tool is also available as a separate command (deinstall) in Oracle home directories after installation. It is located in ORACLE_HOME\deinstall.

The deinstall command uses the information you provide and the information gathered from the software home to create a response file. Alternatively, you can supply a response file generated previously by the deinstall command using the –checkonly option, or by editing the response file template.

The deinstallation tool stops Oracle software, and removes Oracle software and configuration files on the operating system for a specific Oracle home.

If the software in the Oracle home is not running (for example, after an unsuccessful installation), then the deinstallation tool cannot determine the configuration, and you must provide all the configuration details either interactively or in a response file.

Caution:

When you run the deinstallation tool, if the central inventory contains no other registered homes besides the home that you are deconfiguring and removing, then the Deinstallation tool removes the following files and directory contents in the Oracle base directory of the Oracle Database installation owner:
  • admin

  • cfgtoollogs

  • checkpoints

  • diag

  • oradata

  • flash_recovery_area

Oracle strongly recommends that you configure your installations using an Optimal Flexible Architecture (OFA) configuration, and that you reserve Oracle base and Oracle home paths for exclusive use of Oracle software. If you have any user data in these locations in the Oracle base that is owned by the user account that owns the Oracle software, then the deinstallation tool deletes this data.

In addition, for Oracle Grid Infrastructure installations:

  • Oracle Automatic Storage Management Cluster File System (Oracle ACFS) must be dismounted and Oracle Automatic Storage Management Dynamic Volume Manager (Oracle ADVM) must be disabled.

  • If Grid Naming Service (GNS) is in use, then the entry for the subdomain needs to be deleted from DNS by your DNS administrator.

Oracle recommends that you run the deinstallation tool as the Oracle software installation owner. The default method for running the deinstallation tool is from the deinstall directory in the Oracle home as the installation owner:

%ORACLE_HOME%\deinstall
DRIVE_LETTER:\> deinstall\deinstall.bat

The command uses the following syntax, where variable content is indicated by italics:

deinstall.bat -home complete path of Oracle home [-silent] [-checkonly]
[-paramfile complete path of input parameter property file] [-params name1=value name2=value . . .]
[-o complete path of directory for saving files] [-help]
[-tmpdir complete path of temporary directory to use] 
[-logdir complete path of log directory to use] [-help]
 

To run the deinstallation tool from the database installation media, use the setup.exe command with the -deinstall option, followed by the -home option to specify the path of the Oracle home you want to remove using the following syntax, where variable content is indicated in italics:

setup.exe -deinstall -home complete path of Oracle home [-silent] [-checkonly] [-paramfile complete path of input parameter property file] [-params name1=value
name2=value . . .] [-o complete path of directory for saving files] [-help]
[-tmpdir complete path of temporary directory to use] 
[-logdir complete path of log directory to use] [-help]
 

Provide information about your servers as prompted or accept the defaults.

In addition, you can run the deinstallation tool from other locations, or with a response file, or select the following options to run the tool:

  • -home

    Use this flag to indicate the home path of the Oracle home to check or deinstall. To deinstall Oracle software using the deinstall command, located in the Oracle home you plan to deinstall, provide a response file in a location outside the Oracle home, and do not use the -home flag.

    If you run the deinstallation tool from the ORACLE_HOME\deinstall path, then the -home flag is not required because the tool knows from which home it is being run. If you run the tool using setup.exe -deinstall from the installation media, then -home is mandatory.

  • -silent

    Use this flag to run the deinstallation tool in noninteractive mode. This option requires one of the following:

    • A working system that it can access to determine the installation and configuration information. The -silent flag does not work with failed installations.

    • A response file that contains the configuration values for the Oracle home that is being deinstalled or deconfigured.

    You can generate a response file to use or modify by running the tool with the -checkonly flag. The tool then discovers information from the Oracle home to deinstall and deconfigure. It generates the response file that you can then use with the -silent option.

    You can also modify the template file deinstall.rsp.tmpl, located in the ORACLE_HOME\deinstall\response directory.

  • -checkonly

    Use this flag to check the status of the Oracle software home configuration. Running the deinstallation tool with the -checkonly flag does not remove the Oracle configuration. The -checkonly flag generates a response file that you can then use with the deinstallation tool and -silent option.

  • -paramfile complete path of input parameter property file

    Use this flag to run the deinstallation tool with a response file in a location other than the default. When you use this flag, provide the complete path where the response file is located.

    The default location of the response file depends on the location of the deinstallation tool:

    • From the installation media or stage location: \response

    • After installation from the installed Oracle home: ORACLE_HOME\deinstall\response.

  • -params ["name1=value" "name2=value" "name3=value" . . .]

    Use this flag with a response file to override one or more values to change it in a response file you have created.

  • -o complete path of directory for saving response file

    Use this flag to provide a path other than the default location where the response file is saved. The default location is \response\deinstall.rsp.tmpl.

    The default location of the response file depends on the location of deinstallation tool:

    • From the installation media or stage location before installation: \response

    • After installation from the installed Oracle home: ORACLE_HOME/deinstall/response.

  • -tmpdir complete path of temporary directory

    Specifies a non-default location where Oracle Deinstallation Tool writes the temporary files for the deinstallation.

  • -logdir complete path of log directory

    Specifies a non-default location where Oracle Deinstallation Tool writes the log files for the deinstallation.

  • -help

    Use the help option (-help ) to obtain additional information about the command optional flags.

5.2 Oracle Database Deinstallation Example

If you perform a deinstallation by running the setup.exe command with the -deinstall option from the installation media, then help is displayed unless you enter a -home flag and provide a path to the home directory of the Oracle software to remove from your system.

Use the optional flag -paramfile to provide a path to a response file.

In the following example, the setup.exe command is in the path \directory_path, where directory_path is the path to the database directory on the installation media, and C:\app\oracle\product\12.1.0\client_1 is the path to the Oracle home which is removed:

DRIVE_LETTER:\> cd \directory_path
DRIVE_LETTER:\> setup.exe -deinstall -home C:\app\oracle\product\12.1.0\client_1 

The following example uses a response file in the software owner location C:\Documents and Settings\oracle\:

DRIVE_LETTER:\> cd \directory_path
DRIVE_LETTER:\> setup.exe -deinstall -paramfile C:\Documents and Settings\oracle\my_db_paramfile.tmpl

5.3 Example of Running the Deinstallation Command

If you perform a deinstallation by using the deinstall command from the ORACLE_HOME\deinstall folder, then the deinstallation starts without prompting you for an ORACLE_HOME.

Use the optional flag -paramfile to provide a path to a response file.

In the following example, the deinstall command is in the path C:\app\oracle\product\12.1.0\client_1\deinstall, and it uses a response file in the software owner location C:\Documents and Settings\oracle\:

DRIVE_LETTER:\> cd \app\oracle\product\12.1.0\client_1\deinstall\
DRIVE_LETTER:\> deinstall.bat -paramfile %HOMEPATH%\my_db_paramfile.tmpl

5.4 Example of a Deinstallation Response File for an Oracle Database Client

You can perform a deinstallation on a standalone Oracle Database with the -paramfile option to use the values you specify in the response file. The following is an example of a response file, in which the Oracle Database binary owner is oracle, the Oracle Database home (Oracle home) is in the path D:\app\oracle\product\12.1.0\client_1, the Oracle base (where other Oracle software is installed) is D:\app\oracle, the Oracle Inventory home is C:\Program Files\Oracle\Inventory, and the local node (the node where you are running the deinstallation session from) is client1:

ORACLE_BASE=D\:\app\oracle
INVENTORY_LOCATION=C\:\Program Files\Oracle\Inventory
CRS_HOME=false
HOME_TYPE=CLIENT
silent=false
local=false
LOCAL_NODE=client1
ObaseCleanupPtrLoc=\tmp\install\orabase_cleanup.lst.
LOGDIR=D\:\app\oracle\product\12.1.0\client_1\deinstall\logs\
ORACLE_HOME=D\:\app\oracle\product\12.1.0\client_1