Deinstallation of Grid after upgrade on ODA machine

How to Manually Remove an Old Grid Home After Upgrading/Patching to a Higher Grid Home on ODA

Step 1: Verify the size of the Grid homes

[root@ app]# du -sh *
13G 19.16.0.0 — Old Grid Infra
12G 19.18.0.0 — Current Grid Infra
12G grid
0 odaorabase
4.7G odaorabase0
44G odaorahome
118M oraInventory

Step 2:  Take backup of Grid home

cd /u01/app

cp -RP 19.16.0.0 /u05/app/oracle/1916_grid_backup/

[root@ app]# cd /u05/app/oracle/1916_grid_backup/

Step 3:  deinstall -checkonly

[root@ app]# ls -ld 19.16.0.0/
drwxr-xr-x 3 root oinstall 4096 Dec 7 2022 19.16.0.0/
[root@ app]# chown -R grid:oinstall 19.16.0.0/
[root@ app]# ls -ld 19.16.0.0/
drwxr-xr-x 3 grid oinstall 4096 Dec 7 2022 19.16.0.0/
[root@ app]# chmod -R 775 19.16.0.0/
[root@ app]# ls -ld 19.16.0.0/
drwxrwxr-x 3 grid oinstall 4096 Dec 7 2022 19.16.0.0/
[root@ app]#deinstall -checkonlyConnect as grid[root@ app]# sudo su – grid
Last login: Sat Mar 23 02:25:05 EDT 2024 on pts/2

[grid@ ~]$ export ORACLE_HOME=/u01/app/19.16.0.0/grid
[grid@ ~]$ echo $ORACLE_HOME
/u01/app/19.16.0.0/grid
[grid@ deinstall]$ pwd
/u01/app/19.16.0.0/grid/deinstall
[grid@ deinstall]$ ./deinstall -checkonly
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 ##
Remote nodes on which old homes will be deleted:
Checking for existence of the Oracle home location /u01/app/19.16.0.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/19.18.0.0/grid
The following nodes are part of this cluster:
Checking for sufficient temp space availability on node(s) : ”

## [END] Install check configuration ##
Traces log file: /u01/app/oraInventory/logs//crsdc_2024-03-23_02-30-28-AM.log
Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2024-03-23_02-30-28AM.log
Network Configuration check config END
Asm Check Configuration START
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2024-03-23_02-30-28AM.log

ASM was not detected in the Oracle Home

Database Check Configuration START
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2024-03-23_02-30-28AM.log

Oracle Grid Management database was not found in this Grid Infrastructure home
Database Check Configuration END

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

####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/19.18.0.0/grid
The following nodes are part of this cluster:
The cluster node(s) on which the Oracle home deinstallation will be performed are:
Oracle Home selected for deinstall is: /u01/app/19.16.0.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/19.18.0.0/grid)
ASM was not detected in the Oracle Home
Oracle Grid Management database was not found in this Grid Infrastructure home
Location of response file generated: ‘/tmp/deinstall2024-03-23_02-30-15AM/response/deinstall_OraGrid191600.rsp’
A log of this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2024-03-23_02-30-19-AM.out’
Any error messages from this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2024-03-23_02-30-19-AM.err’

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

Step 5: Actual Deinstallation

[grid@ deinstall]$ pwd

/u01/app/19.16.0.0/grid/deinstall
[grid@ 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 ##
Remote nodes on which old homes will be deleted:

Checking for existence of the Oracle home location /u01/app/19.16.0.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/19.18.0.0/grid
The following nodes are part of this cluster:
Checking for sufficient temp space availability on node(s) : ”

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2024-03-23_02-31-32-AM.log

Network Configuration check config START
Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2024-03-23_02-31-32AM.log
Network Configuration check config END

Asm Check Configuration START
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2024-03-23_02-31-32AM.log
ASM was not detected in the Oracle Home

Database Check Configuration START
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2024-03-23_02-31-32AM.log
Oracle Grid Management database was not found in this Grid Infrastructure home
Database Check Configuration END

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

####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/19.18.0.0/grid
The following nodes are part of this cluster:
The cluster node(s) on which the Oracle home deinstallation will be performed are:
Oracle Home selected for deinstall is: /u01/app/19.16.0.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/19.18.0.0/grid)
ASM was not detected in the Oracle Home
Oracle Grid Management database was not found in this Grid Infrastructure home

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-03-23_02-31-23-AM.out’
Any error messages from this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2024-03-23_02-31-23-AM.err’

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2024-03-23_02-31-32AM.log
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2024-03-23_02-31-32AM.log
ASM Clean Configuration END
Network Configuration clean config START
Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2024-03-23_02-31-32AM.log

De-configuring Naming Methods configuration file…
Naming Methods configuration file de-configured successfully.

De-configuring Local Net Service Names configuration file…
Local Net Service Names 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

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

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

There is no Oracle Grid Management database to de-configure in this Grid Infrastructure home
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/19.18.0.0/grid)
Oracle Clusterware was successfully unlocked on node “”.
#######################################################################

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

Using properties file /tmp/deinstall2024-03-23_02-31-19AM/response/deinstall_2024-03-23_02-31-23-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-03-23_02-31-23-AM.out’
Any error messages from this session will be written to: ‘/u01/app/oraInventory/logs/deinstall_deconfig2024-03-23_02-31-23-AM.err’

######################## DEINSTALL CLEAN OPERATION START ########################

## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to
Setting CLUSTER_NODES to
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2024-03-23_02-31-19AM/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 ‘/u01/app/19.16.0.0/grid’ from the central inventory on the local node : Done
Delete directory ‘/u01/app/19.16.0.0/grid’ on the local node : Done
The Oracle Base directory ‘/u01/app/grid’ will not be removed on local node. The directory is in use by Oracle Home ‘/u01/app/19.18.0.0/grid’.
Oracle Universal Installer cleanup was successful.
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 ‘/u01/app/19.16.0.0/grid’ from the central inventory on the local node.
Successfully deleted directory ‘/u01/app/19.16.0.0/grid’ on the local node.
Oracle Universal Installer cleanup was successful.

Review the permissions and contents of ‘/u01/app/grid’ on nodes(s) ”.
If there are no Oracle home(s) associated with ‘/u01/app/grid’, manually delete ‘/u01/app/grid’ and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################

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

Step 6: Verify Deinstallation

[grid@ app]$ du 19.16.0.0/
4 19.16.0.0/
[grid@ app]$ cd 19.16.0.0/
[grid@ app]$ exit
logoutConnect as root[root@ app]# rmdir /u01/app/19.16.0.0
[root@ app]#
[root@ app]# ps -ef|grep pmon
grid 8169 1 0 2023 ? 00:07:20 asm_pmon_+ASM1
grid 9862 1 0 2023 ? 00:07:06 apx_pmon_+APX1
oracle 17359 1 0 2023 ? 00:11:38 ora_pmon_ORCLP
root 61101 30746 0 02:34 pts/2 00:00:00 grep –color=auto pmon
[root@ app]#

Reference: (Doc ID 2537389.1)

See also

ODA Administrations: How to Manually Remove an Old Grid Home After Upgrading/Patching to a Higher Grid Home on ODA (Doc ID 2537389.1)