Oracle Database Software 21c Deinstallation: A Step-by-Step Guide

Deinstalling Oracle software from your system is a critical task that requires careful attention to ensure that no unnecessary files are left behind

  1. Set the Oracle Home Environment Variable

Set the ORACLE_HOME environment variable to the appropriate Oracle Home:

[oracle@discovery deinstall]$ export ORACLE_HOME=/u02/app/oracle/product/21/dbhome_1

2. Navigate to the Deinstall Directory

deinstall directory under Oracle Home. Navigate to this directory:

cd /u02/app/oracle/product/21/dbhome_1/deinstall

Warning: Verify Oracle Home and Oracle Inventory Before Proceeding!
Before you begin the deinstallation process, double-check the following:Oracle Home: Ensure the ORACLE_HOME environment variable points to the correct directory & Verify the ORA_INVENTORY is correctly set. Incorrect paths can cause issues during deinstallation

3. Run the Deinstall

Once the environment is set, run the deinstall :

[oracle@discovery deinstall]$ ./deinstall

Sample deinstall output

[oracle@discovery deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u02/app/oracle/product/21/dbhome_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u02/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory

## [END] Install check configuration ##

## [START] GIMR check configuration ##
Checking for existence of GIMR
GIMR Home not detected
## [END] GIMR check configuration ##

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2024-11-22_05-15-27AM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2024-11-22_05-15-27AM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home []:
Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u02/app/oracle/product/21/dbhome_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2024-11-22_05-15-22-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2024-11-22_05-15-22-AM.err'

######################## DECONFIG CLEAN OPERATION START ########################
## [START] GIMR configuration update ##
## [END] GIMR configuration update ##
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2024-11-22_05-15-27AM.log

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2024-11-22_05-15-27AM.log

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2024-11-22_05-15-14AM/response/deinstall_2024-11-22_05-15-22-AM.rsp
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2024-11-22_05-15-22-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2024-11-22_05-15-22-AM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to discovery
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2024-11-22_05-15-14AM/oraInst.loc
Setting oracle.installer.local to false

Removing directory '/u02/app/oracle/homes/OraDB21Home1' on node(s) 'discovery'
## [END] Preparing for Deinstall ##

Oracle Universal Installer clean START

Detach Oracle home 'OraDB21Home1' from the central inventory on the local node : Done

Delete directory '/u02/app/oracle/product/21/dbhome_1' on the local node : Done

Delete directory '/u02/app/oracle' on the local node : Done

You can find a log of this session at:
'/u01/app/oraInventory/logs//Cleanup2024-11-22_05-15-55AM.log'

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home 'OraDB21Home1' from the central inventory on the local node.
Successfully deleted directory '/u02/app/oracle/product/21/dbhome_1' on the local node.
Successfully deleted directory '/u02/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

The deinstallation was completed successfully!

Alert: The information provided on this website is for educational purposes only. It has been tested internally, but there is no guarantee it will work in every environment. It is strongly recommended to first test the process in a non-production environment, such as a User Acceptance Testing (UAT) setup. This allows you to verify configurations, identify any issues, and ensure a smooth transition to production, minimizing the risk of disruptions in your live environment. Always conduct thorough testing before applying changes to production systems.

admin

Welcome to the DBA Discovery Hub! As an OCP, I’m here to share articles, tutorials, and tips on Oracle Database Administration. Let’s connect and explore together! Start exploring!

View All Post

Leave a Reply

Your email address will not be published. Required fields are marked *