Removing Oracle 10g Software from Linux Server

This article briefs about the steps that are required to remove Oracle 10g software from Linux server using Oracle Universal Installer and manually.

Removing Oracle 10g Software Using Oracle Universal Installer

  • Identify all instances associated with the Oracle home:

To identify all instances associated with the Oracle home that you want to remove, issue the following command

$ cat /etc/oratab |grep "/"

The output will be similar to the following:

db10g1:/u01/app/oracle/product/10.2.0/db10g1:N

There is one instance associated with the /u01/app/oracle/product/10.2.0/db10g1 Oracle Home directory

  • Remove database:

To completely remove Oracle Database software, you must remove any installed databases. To remove an Oracle database:

a. Log in as oracle user:

$ su - oracle

b. Set the environment for the database that you want to remove:

$ . /usr/local/bin/oraenv            # for Bourne, Bash, or Korn shell:
$ source /usr/local/bin/coraenv      # for C shell

c. At the prompt, specify the SID for the database that you want to remove.
d. Start the Database Configuration Assistant by invoking dbca
e. Click Next on Welcome Screen, In Operations Window Select Delete a Database

  • Deleting the Oracle CSS Daemon Configuration:

Log in as root user and set environment variables:

# ORACLE_HOME=/u01/app/oracle/product/10.2.0/db10g1
# export ORACLE_HOME

Enter the below command to delete the CSS daemon configuration from this Oracle home:

# $ORACLE_HOME/bin/localconfig delete
  • Removing Oracle Software:

The following steps describe how to use Oracle Universal Installer to remove Oracle software from an Oracle home:

Always use Oracle Universal Installer to remove Oracle software. Do not delete any Oracle home directories without first using Oracle Universal Installer to remove the software.

a. Login as oracle user:

$ su - oracle

b. Set the environment for the database that you want to remove:

c. Stop any Oracle background processes running in this Oracle home:

Grid Control for Database Management            $ORACLE_HOME/bin/emctl stop agent
Database Control for Database Management        $ORACLE_HOME/bin/emctl stop dbconsole
Oracle Net listener                             $ORACLE_HOME/bin/lsnrctl stop
iSQL*Plus                                       $ORACLE_HOME/bin/isqlplusctl stop
Ultra Search                                    $ORACLE_HOME/bin/searchctl stop

d. Start Oracle Universal Installer

$ $ORACLE_HOME/oui/bin/runInstaller

e. In the Welcome window, click Deinstall Products. In the Inventory screen, select the Oracle home and the products that you want to remove, then click Remove. Oracle Universal Installer displays a confirmation window asking you to confirm that you want to deinstall the products and their dependent components. When the products have been deleted, click Cancel to exit from Oracle Universal Installer, and then click Yes.

Removing Oracle 10g Software by Hand

Always use Oracle Universal Installer to remove Oracle software. Do not delete any Oracle home directories without first using Oracle Universal Installer to remove the software. I do not recommend the manual approach, exercise caution while deleting directories with root privilege.

If an attempt to remove the Oracle Software has failed for some reason, use below information to remove oracle manually.

  • Login as root
# ORACLE_BASE=/u01/app; export ORACLE_BASE
# ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db10g1; export ORACLE_HOME
# $ORACLE_HOME/bin/localconfig delete

This will stop Oracle CSS daemon and deletes the configuration

# rm -f /etc/inittab.cssd
# rm -rf /etc/oracle

This removes CSS daemon script and CSS configuration directory.

  • Issue below commands to remove
# rm -rf $ORACLE_BASE/*             #<--- Removes Entire Oracle Software Directory
# rm -f /etc/oraInst.loc            #<--- Removes Install Loc
# rm -f /etc/oratab                 #<--- Removes OraTab used by dbstart and dbshut scripts
# rm -f /usr/local/bin/dbhome       #<--- Removes Database Home Identifier Script
# rm -f /usr/local/bin/oraenv       #<--- Removes Env Script used by Bourne, Bash, or Korn shell
# rm -f /usr/local/bin/coraenv      #<--- Removes Env Script used by C shell
  • Login as oracle and comment out below environment variables from oracle users’ .bash_profile
#export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db10g1
#export PATH=$PATH:$ORACLE_HOME/bin
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Leave a Comment

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

Time limit is exhausted. Please reload the CAPTCHA.