At times we will have to perform a manual cleanup of failed CRS installation or some old CRS installation that was done.
Oracle provides two scripts to cleanup the CRS, The names and location of the scripts are given below.
1) Run rootdelete.sh script located at ‘$ORA_CRS_HOME/install’ directory
2) Run rootdeinstall.sh script located at ‘$ORA_CRS_HOME/install’ directory
If the CRSHOME is deleted before running the above mentioned scripts then, one can follow the following steps to cleanup the CRS manually.
Note: The locations used in the following cleanup process are based on the LINUX platform, the locations may slightly differ with the corresponding flavor of the OS.
Manual Cleanup of CRS on LINUX
1. Remove below mentioned files as root user on ALL NODES that form a CLUSTER
rm -f /etc/init.d/init.cssd
rm -f /etc/init.d/init.crs
rm -f /etc/init.d/init.crsd
rm -f /etc/init.d/init.evmd
rm -f /etc/rc2.d/K96init.crs
rm -f /etc/rc2.d/S96init.crs
rm -f /etc/rc3.d/K96init.crs
rm -f /etc/rc3.d/S96init.crs
rm -f /etc/rc5.d/K96init.crs
rm -f /etc/rc5.d/S96init.crs
rm -Rf /etc/oracle/scls_scr
rm -f /etc/inittab.crs
cp /etc/inittab.orig /etc/inittab
2. If the EVM, CRS and CSS processes are not already down then kill them off as root user on ALL NODES
ps -ef | grep evm
ps -ef | grep crs
ps -ef | grep css
3. Remove the files in /var/tmp/.oracle or /tmp/.oracle on ALL NODES
rm -f /var/tmp/.oracle/*
rm -f /tmp/.oracle/*
4. Make sure that you remove the ocr.loc at /etc/oracle on ALL NODES
5. De-install the CRS home using the Oracle Universal Installer; this is to remove the CRS home from inventory. Installer may not be able to remove all the files, because CRS home is already deleted, but this will help in cleaning up the inventory.
6. Remove the CRS install location on ALL NODES
7. Remove OCR and Voting disk from shared location from any 1 node
Once these steps are performed then the hosts are ready for the next CRS installation.