From 11gR2, de-installing Oracle Home should be done by deinstall tools provided separately. De-installation from 11.2 OUI is desupported. Please note the following text taken from the 11.2 Installation guides under:
Chapter7 Removing Oracle Database Software
7.1 About the Deinstallation Tool
When you run the deinstall command, 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:
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 deinstall command deletes this data.
It is also suggested that before doing a deinstall on a server where more than one ORACLE_HOME exists there are a valid set of backups for the ORACLE_HOMEs, databases, and oraInventory.
Official documentation presents two methods to remove Oracle Database software:
1) External de-install utility downloadable from OTN ***Recommended method***
It is advised to use the external De-install utility that is downloadable from OTN as currently there are some open bugs with the deinstall script.
To get the external tool :
Under Oracle Database 11g Release 2, click See All for the respective platform for which you want to download the De-install utility.
If the intent is to deinstall 184.108.40.206 or 220.127.116.11 then you should use the latest version of the 11.2 deinstall utility, which would be version 18.104.22.168.0.
The De-install utility is available for download from the following links:
2) Deinstall script located inside Oracle Home (It is highly recommended not use the $ORACLE_HOME deinstall utility for versions 22.214.171.124 and 126.96.36.199, Download an use the 188.8.131.52.0 version):
%ORACLE_HOME%\deinstall\deinstall.bat (windows platforms)
3) It is possible to run the deinstall utility without doing the deinstall to confirm the deinstall will remove what is expected and allow any potential problems to be sorted out by running the following command:
$ /<path to location of deinstall utility>/deinstall/deinstall -home <path to ORACLE_HOME that is to be removed> -checkonly (unix/linux platforms)
% \<path to location of deinstall utility>\deinstall\deinstall -home <path to ORACLE_HOME that is to be removed> -checkonly (WINDOWS platform)
The logs can be found in one of the locations noted in the LOG LOCATION section below.
This will also generate a parameter file that can be used with interactive or silent deinstall. The parameter file will be generated in the /<path to location of deinstall utility>/deinstall/response directory.
De-installing Oracle Home using external de-install utility
If Oracle Home deinstall script has some issue and you want to deinstall home then you can download separate de-install utility from OTN and use it.
1. Download and unzip de-install utility in some folder outside Oracle Home.
2. Go to the deinstall folder.
3. Invoke deinstall utility with the -home option specifying the full path of the Oracle Home you want to deinstall.
4. If you want to do a non-interactive deinstall you can use the -silent option with a parameter file.
An example response file is located in /deinstall/response/deinstall.rsp.tmpl. You can modify and use it.
5. Check the logs created under <central_inventory>/logs folder for any issue.
6. Check the inventory is updated properly.
7. Check if Oracle Home folder is deleted or not. If not then you have to remove it manually.
- deinstall tool creates logs as per this logic:
a) If there are other oracle home (OUI based) in this Host except one which you are installing then it will create log under <central_inventory>/log folder.
b) If this is last Oracle Home to be deinstalled then current central inventory will also get deleted along with deinstall , therefore in this case it will choose log locations in the following order:
- It will create log directory in current location where deinstall utility is launched.
- If current folder is not writable or remotely mounted (permission issues ) then it will create user home directory (/home/oracle) as next option.
- If all criteria above is not met then it will proceed to create log directory under user TEMP location (/tmp).