About Oracle Deinstallation Options
You can stop and remove Oracle Database software and components in an Oracle Database home with Oracle Universal Installer.
You can remove the following software using Oracle Universal Installer or the Oracle deinstallation tool:
-
Oracle Database
-
Oracle Grid Infrastructure, which includes Oracle Clusterware and Oracle Automatic Storage Management (Oracle ASM)
-
Oracle Real Application Clusters (Oracle RAC)
-
Oracle Database Client
Starting with Oracle Database 12c, the deinstallation tool is integrated with the database installation media. You can run the deinstallation tool using the runInstaller
command with the -deinstall
and -home
options from the base directory of the Oracle Database or Oracle Database Client installation media.
The deinstallation tool is also available as a separate command (deinstall
) in Oracle home directories after installation. It is located in the $ORACLE_HOME/deinstall
directory.
The deinstallation tool creates a response file by using information in the Oracle home and using the information you provide. You can use a response file that you generated previously by running the deinstall
command using the -checkonly
option. You can also edit the response file template.
If you run the deinstallation tool to remove an Oracle Grid Infrastructure installation, then the deinstaller prompts you to run the deinstall script as the root
user. For Oracle Grid Infrastructure for a cluster, the script is rootcrs.sh
, and for Oracle Grid Infrastructure for a standalone server (Oracle Restart), the script is roothas.sh
.
Note:
-
You must run 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.2 installation media to remove Oracle software from an existing 11.2.0.4 Oracle home.
-
Starting with Oracle Database 12c Release 1 (12.1.0.2), the
roothas.sh
script replaces theroothas.pl
script in the Oracle Grid Infrastructure home for Oracle Restart, and therootcrs.sh
script replaces therootcrs.pl
script in the Grid home for Oracle Grid Infrastructure for a cluster.
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.
In addition, before you run the deinstallation tool for Oracle Grid Infrastructure installations:
-
Dismount Oracle Automatic Storage Management Cluster File System (Oracle ACFS) and disable Oracle Automatic Storage Management Dynamic Volume Manager (Oracle ADVM).
-
If Grid Naming Service (GNS) is in use, then notify your DNS administrator to delete the subdomain entry from the DNS.
Files Deleted by the Deinstallation Tool
When you run the deinstallation tool, if the central inventory (oraInventory
) contains no other registered homes besides the home that you are deconfiguring and removing, then the deinstall command removes the following files and directory contents in the Oracle base directory of the Oracle Database installation owner:
-
admin
-
cfgtoollogs
-
checkpoints
-
diag
-
oradata
-
fast_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.
Caution:
The deinstallation tool deletes Oracle Database configuration files, user data, and fast recovery area (FRA) files even if they are located outside of the Oracle base directory path.