export ORACLE_HOME=/home/oracle/product/11.2.0.4/db_1
## detach ORACLE_HOME
$ORACLE_HOME/oui/bin/runInstaller -detachHome -silent ORACLE_HOME=$ORACLE_HOME
## confirm $ORACLE_HOME is removed from central inventory:
/home/grid/12.2.0.1/OPatch/opatch lsinventory -all
## remove files in ORACLE_HOME manually on all nodes
/bin/rm -rf $ORACLE_HOME
unset ORACLE_HOME
## detach ORACLE_HOME
$ORACLE_HOME/oui/bin/runInstaller -detachHome -silent ORACLE_HOME=$ORACLE_HOME
## confirm $ORACLE_HOME is removed from central inventory:
/home/grid/12.2.0.1/OPatch/opatch lsinventory -all
## remove files in ORACLE_HOME manually on all nodes
/bin/rm -rf $ORACLE_HOME
unset ORACLE_HOME