Below are the steps to deinstall or cleanup oracle standalone grid infrastructure setup.
1. Login with grid owner and ( i.e oracle or grid).
export GRID_HOME=/oracle/app/oracle/product/12.1.0.2/grid
cd $GRID_HOME/deinstall
2. Run deinstall tool
cd $GRID_HOME/deinstall
./deinstall
cd $GRID_HOME/deinstall ./deinstall $ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2019-10-02_10-53-45AM/logs/ ############ ORACLE DECONFIG TOOL START ############ ######################### DECONFIG CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /oracle/app/oracle/product/12.1.0.2/grid Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server Oracle Base selected for deinstall is: /oracle/app/oracle Checking for existence of central inventory location /oracle/app/oraInventory Checking for existence of the Oracle Grid Infrastructure home /oracle/app/oracle/product/12.1.0.2/grid ## [END] Install check configuration ## Traces log file: /tmp/deinstall2019-10-02_10-53-45AM/logs//crsdc_2019-10-02_10-53-55AM.log Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/netdc_check2019-10-02_10-53-55-AM.log Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]: Network Configuration check config END Asm Check Configuration START ASM de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/asmcadc_check2019-10-02_10-54-26-AM.log Automatic Storage Management (ASM) instance is detected in this Oracle home /oracle/app/oracle/product/12.1.0.2/grid. ASM Diagnostic Destination : /oracle/app/oracle ASM Diskgroups : +MGMT ASM diskstring : /dev/oracleasm/disks/* Diskgroups will be dropped De-configuring ASM will drop all the diskgroups and their 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]: N 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 [/oracle/app/oracle]: Specify the diskstring [/dev/oracleasm/disks/*]: Specify the diskgroups that are managed by this ASM instance [+MGMT]: De-configuring ASM will drop the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups (y|n) [y]: y Database Check Configuration START Database de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/databasedc_check2019-10-02_10-55-12-AM.log Database Check Configuration END ######################### DECONFIG CHECK OPERATION END ######################### ####################### DECONFIG CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /oracle/app/oracle/product/12.1.0.2/grid The following nodes are part of this cluster: null The cluster node(s) on which the Oracle home deinstallation will be performed are:null Oracle Home selected for deinstall is: /oracle/app/oracle/product/12.1.0.2/grid Inventory Location where the Oracle home registered is: /oracle/app/oraInventory Following Oracle Restart enabled 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/deinstall2019-10-02_10-53-45AM/logs/deinstall_deconfig2019-10-02_10-53-54-AM.out' Any error messages from this session will be written to: '/tmp/deinstall2019-10-02_10-53-45AM/logs/deinstall_deconfig2019-10-02_10-53-54-AM.err' ######################## DECONFIG CLEAN OPERATION START ######################## Database de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/databasedc_clean2019-10-02_10-55-14-AM.log ASM de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/asmcadc_clean2019-10-02_10-55-14-AM.log ASM Clean Configuration START ASM Clean Configuration END Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2019-10-02_10-53-45AM/logs/netdc_clean2019-10-02_10-55-50-AM.log De-configuring Oracle Restart enabled listener(s): LISTENER De-configuring listener: LISTENER Stopping listener: LISTENER Listener stopped successfully. Unregistering listener: LISTENER Listener unregistered successfully. Deleting listener: LISTENER Listener deleted successfully. Listener de-configured successfully. De-configuring Naming Methods configuration file... Naming Methods configuration file de-configured successfully. De-configuring backup files... Backup files de-configured successfully. The network configuration has been cleaned up successfully. Network Configuration clean config END ----------------------------------------> Run the following command as the root user or the administrator on node "dbahost.test". /tmp/deinstall2019-10-02_10-53-45AM/perl/bin/perl -I/tmp/deinstall2019-10-02_10-53-45AM/perl/lib -I/tmp/deinstall2019-10-02_10-53-45AM/crs/install /tmp/deinstall2019-10-02_10-53-45AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2019-10-02_10-53-45AM/response/deinstall_OraGI12Home1.rsp" Press Enter after you finish running the above commands
Run the mentioned script from root from a different window.
[root@dbahost.test ~]# /tmp/deinstall2019-10-02_10-53-45AM/perl/bin/perl -I/tmp/deinstall2019-10-02_10-53-45AM/perl/lib -I/tmp/deinstall2019-10-02_10-53-45AM/crs/install /tmp/deinstall2019-10-02_10-53-45AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2019-10-02_10-53-45AM/response/deinstall_OraGI12Home1.rsp" Using configuration parameter file: /tmp/deinstall2019-10-02_10-53-45AM/response/deinstall_OraGI12Home1.rsp PRKO-2573 : ONS daemon is already stopped. CRS-2673: Attempting to stop 'ora.cssd' on 'dbahost.test' CRS-2677: Stop of 'ora.cssd' on 'dbahost.test' succeeded CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbahost.test' CRS-2673: Attempting to stop 'ora.evmd' on 'dbahost.test' CRS-2677: Stop of 'ora.evmd' on 'dbahost.test' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbahost.test' has completed CRS-4133: Oracle High Availability Services has been stopped. 2019/10/02 10:56:28 CLSRSC-337: Successfully deconfigured Oracle Restart stack
When root script execution is done , you can press enter on the first screen, which will resume and complete the rest of the activities.
######################### DECONFIG CLEAN OPERATION END ######################### ####################### DECONFIG CLEAN OPERATION SUMMARY ####################### ASM instance was de-configured successfully from the Oracle home Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER Oracle Restart was already stopped and de-configured on node "dbahost.test" Oracle Restart is stopped and de-configured successfully. ####################################################################### ############# ORACLE DECONFIG TOOL END ############# Using properties file /tmp/deinstall2019-10-02_10-53-45AM/response/deinstall_2019-10-02_10-53-54-AM.rsp Location of logs /tmp/deinstall2019-10-02_10-53-45AM/logs/ ############ ORACLE DEINSTALL TOOL START ############ ####################### DEINSTALL CHECK OPERATION SUMMARY ####################### A log of this session will be written to: '/tmp/deinstall2019-10-02_10-53-45AM/logs/deinstall_deconfig2019-10-02_10-53-54-AM.out' Any error messages from this session will be written to: '/tmp/deinstall2019-10-02_10-53-45AM/logs/deinstall_deconfig2019-10-02_10-53-54-AM.err' ######################## DEINSTALL CLEAN OPERATION START ######################## ## [START] Preparing for Deinstall ## Setting LOCAL_NODE to dbahost.test Setting CRS_HOME to true Setting oracle.installer.invPtrLoc to /tmp/deinstall2019-10-02_10-53-45AM/oraInst.loc Setting oracle.installer.local to false ## [END] Preparing for Deinstall ## Setting the force flag to false Setting the force flag to cleanup the Oracle Base Oracle Universal Installer clean START Detach Oracle home '/oracle/app/oracle/product/12.1.0.2/grid' from the central inventory on the local node : Done Delete directory '/oracle/app/oracle/product/12.1.0.2/grid' on the local node : Done Delete directory '/oracle/app/oraInventory' on the local node : Done Delete directory '/oracle/app/oracle' on the local node : Done Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END ## [START] Oracle install clean ## Clean install operation removing temporary directory '/tmp/deinstall2019-10-02_10-53-45AM' on node 'dbahost.test' ## [END] Oracle install clean ## ######################### DEINSTALL CLEAN OPERATION END ######################### ####################### DEINSTALL CLEAN OPERATION SUMMARY ####################### Successfully detached Oracle home '/oracle/app/oracle/product/12.1.0.2/grid' from the central inventory on the local node. Successfully deleted directory '/oracle/app/oracle/product/12.1.0.2/grid' on the local node. Successfully deleted directory '/oracle/app/oraInventory' on the local node. Successfully deleted directory '/oracle/app/oracle' on the local node. Oracle Universal Installer cleanup was successful. Run 'rm -r /etc/oraInst.loc' as root on node(s) 'dbahost.test' at the end of the session. Run 'rm -r /opt/ORCLfmap' as root on node(s) 'dbahost.test' at the end of the session. Run 'rm -r /etc/oratab' as root on node(s) 'dbahost.test' at the end of the session. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL TOOL END #############