About Oracle Deinstallation Options

You can stop and remove Oracle Database software and components in an Oracle Database home with the deinstall command.

You can remove the following software using deinstall :

  • 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

The deinstall command is available in Oracle home directories after installation. It is located in the $ORACLE_HOME/deinstall directory.

deinstall 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 deinstall to remove an Oracle Grid Infrastructure installation, then the deinstaller prompts you to run the deinstall command 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 deinstall command from the same release to remove Oracle software. Do not run the deinstall command from a later release to remove Oracle software from an earlier release. For example, do not run the deinstall command from the 19c Oracle home 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 the roothas.pl script in the Oracle Grid Infrastructure home for Oracle Restart, and the rootcrs.sh script replaces the rootcrs.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 deinstall cannot determine the configuration, and you must provide all the configuration details either interactively or in a response file.

In addition, before you run deinstall 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 deinstall

When you run deinstall, if the central inventory (oraInventory) contains no other registered homes besides the home that you are deconfiguring and removing, then deinstall 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 deinstall deletes this data.

Caution:

deinstall 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.