You don’t have to manually remove directories. There is a deinstall script in the grid home directory. The deinstall checks and prompt questions to confirm before it performs a clean deinstallation (see below).
cd /apps/grid/11.2.0/grid/deinstall
LADB1 - oracle:
./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2012-05-23_02-25-20PM/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############
######################### CHECK OPERATION START #########################
## [START] Install check configuration ##
Checking for existence of the Oracle home location /apps/11.2.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /apps/oracle
Checking for existence of central inventory location /apps/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /apps/11.2.0/grid
The following nodes are part of this cluster: dbsrvl100,dbsrvl101
Checking for sufficient temp space availability on node(s) : 'dbsrvl100,dbsrvl101'
## [END] Install check configuration ##
Traces log file: /tmp/deinstall2012-05-23_02-25-20PM/logs//crsdc.log
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2012-05-23_02-25-20PM/logs/netdc_check2012-05-23_02-25-48-PM.log
Specify all RAC listeners (do not include SCAN listener) that are to be de-configured [LISTENER]:
Network Configuration check config END
Asm Check Configuration START
ASM de-configuration trace file location: /tmp/deinstall2012-05-23_02-25-20PM/logs/asmcadc_check2012-05-23_02-37-14-PM.log
Automatic Storage Management (ASM) instance is detected in this Oracle home /apps/11.2.0/grid.
ASM Diagnostic Destination : /apps/oracle
ASM Diskgroups : +GI
ASM diskstring : /dev/oracleasm/disks
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).
If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you want to modify above information (y|n) [n]: y
Specify the ASM Diagnostic Destination [/apps/oracle]:
Specify the diskstring [/dev/oracleasm/disks]:
Specify the diskgroups that are managed by this ASM instance [+GI]:
De-configuring ASM will drop the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups y|n [y]:
y
######################### CHECK OPERATION END #########################
####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /apps/11.2.0/grid
The cluster node(s) on which the Oracle home deinstallation will be performed are:dbsrvl100,dbsrvl101
Oracle Home selected for deinstall is: /apps/11.2.0/grid
Inventory Location where the Oracle home registered is: /apps/oraInventory
Following RAC listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2012-05-23_02-25-20PM/logs/deinstall_deconfig2012-05-23_02-25-25-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2012-05-23_02-25-20PM/logs/deinstall_deconfig2012-05-23_02-25-25-PM.err'
######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2012-05-23_02-25-20PM/logs/asmcadc_clean2012-05-23_02-38-32-PM.log
ASM Clean Configuration START
ASM Clean Configuration END
Network Configuration clean config START
Network de-configuration trace file location: /tmp/deinstall2012-05-23_02-25-20PM/logs/netdc_clean2012-05-23_02-40-15-PM.log
De-configuring RAC listener(s):
LISTENER
De-configuring listener: LISTENER
Stopping listener: LISTENER
Listener stopped successfully.
Unregistering listener: LISTENER
Listener unregistered successfully.
Listener de-configured successfully.
De-configuring Naming Methods configuration file on all nodes...
Naming Methods configuration file de-configured successfully.
De-configuring Local Net Service Names configuration file on all nodes...
Local Net Service Names configuration file de-configured successfully.
De-configuring Directory Usage configuration file on all nodes...
Directory Usage configuration file de-configured successfully.
De-configuring backup files on all nodes...
Backup files de-configured successfully.
The network configuration has been cleaned up successfully.
Network Configuration clean config END
---------------------------------------->
The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on the local node after the execution completes on all the remote nodes.
Run the following command as the root user or the administrator on node "dbsrvl101".
/tmp/deinstall2012-05-23_02-25-20PM/perl/bin/perl -I/tmp/deinstall2012-05-23_02-25-20PM/perl/lib -I/tmp/deinstall2012-05-23_02-25-20PM/crs/install /tmp/deinstall2012-05-23_02-25-20PM/crs/install/rootcrs.pl -force -deconfig -paramfile "/tmp/deinstall2012-05-23_02-25-20PM/response/deinstall_Ora11g_gridinfrahome1.rsp"
Run the following command as the root user or the administrator on node "dbsrvl100".
/tmp/deinstall2012-05-23_02-25-20PM/perl/bin/perl -I/tmp/deinstall2012-05-23_02-25-20PM/perl/lib -I/tmp/deinstall2012-05-23_02-25-20PM/crs/install /tmp/deinstall2012-05-23_02-25-20PM/crs/install/rootcrs.pl -force -deconfig -paramfile "/tmp/deinstall2012-05-23_02-25-20PM/response/deinstall_Ora11g_gridinfrahome1.rsp" -lastnode
Press
Enter after you finish running the above commands
<----------------------------------------
Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START
Detach Oracle home '/apps/11.2.0/grid' from the central inventory on the local node : Done
Delete directory '/apps/11.2.0/grid' on the local node : Done
Delete directory '/apps/oraInventory' on the local node : Done
The Oracle Base directory '/apps/oracle' will not be removed on local node. The directory is not empty.
Detach Oracle home '/apps/11.2.0/grid' from the central inventory on the remote nodes 'dbsrvl101' : Done
Delete directory '/apps/11.2.0/grid' on the remote nodes 'dbsrvl101' : Done
Delete directory '/apps/oraInventory' on the remote nodes 'dbsrvl101' : Done
The Oracle Base directory '/apps/oracle' will not be removed on node 'dbsrvl101'. The directory is not empty.
Oracle Universal Installer cleanup was successful.
Oracle Universal Installer clean END
## [START] Oracle install clean ##
Clean install operation removing temporary directory '/tmp/deinstall2012-05-23_02-25-20PM' on node 'dbsrvl100'
Clean install operation removing temporary directory '/tmp/deinstall2012-05-23_02-25-20PM' on node 'dbsrvl101'
## [END] Oracle install clean ##
######################### CLEAN OPERATION END #########################
####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following RAC listener(s) were de-configured successfully: LISTENER
Oracle Clusterware is stopped and successfully de-configured on node "dbsrvl101"
Oracle Clusterware is stopped and successfully de-configured on node "dbsrvl100"
Oracle Clusterware is stopped and de-configured successfully.
Successfully detached Oracle home '/apps/11.2.0/grid' from the central inventory on the local node.
Successfully deleted directory '/apps/11.2.0/grid' on the local node.
Successfully deleted directory '/apps/oraInventory' on the local node.
Successfully detached Oracle home '/apps/11.2.0/grid' from the central inventory on the remote nodes 'dbsrvl101'.
Successfully deleted directory '/apps/11.2.0/grid' on the remote nodes 'dbsrvl101'.
Successfully deleted directory '/apps/oraInventory' on the remote nodes 'dbsrvl101'.
Oracle Universal Installer cleanup was successful.
Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'dbsrvl100,dbsrvl101' at the end of the session.
Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'dbsrvl100,dbsrvl101' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
############# ORACLE DEINSTALL & DECONFIG TOOL END #############