This post is also available in:
When running opatchauto with the out-of-place option, the process fails immediately:
OPATCHAUTO-72126: Cannot execute out of place patching.
OPATCHAUTO-72126: Clone home path specified in mapping file already exists on host.
OPATCHAUTO-72126: Please correct clone path mapping file and re-run out of place patching operation.
opatchauto failed with error code 42The error indicates that the destination directory defined in clone.properties already exists on the server.
Why It Happens
In out-of-place patching, opatchauto creates a new Oracle Home by cloning the current one and applying the patch to it. The new home path is defined in the clone.properties file:
/u01/app/19.21.0.0/grid=/u01/app/19.23.0.0/grid
/u01/app/oracle/product/19.0.0.0/dbhome_1=/u01/app/oracle/product/19.23.0.0/dbhome_1If the directory on the right side (destination) already exists — from a previous failed attempt, an old test, or a home that was removed from the inventory but not from the filesystem — opatchauto refuses to run to avoid overwriting data.
Solution
1. Check if the destination home is in the inventory
grep "19.23.0.0" /u01/app/oraInventory/ContentsXML/inventory.xml- If it appears without
REMOVED="T"→ the home is active. Don’t delete. Verify you chose the correct path inclone.properties. - If it appears with
REMOVED="T"→ already deinstalled from the inventory, safe to remove the directory. - If it doesn’t appear → filesystem leftover, safe to remove.
2. Remove the destination directory
ls -la /u01/app/oracle/product/19.23.0.0/dbhome_1/
rm -rf /u01/app/oracle/product/19.23.0.0/dbhome_1⚠ Warning: Confirm no database is running from this home before deleting. Check with
cat /etc/oratab | grep 19.23andps -ef | grep pmon.
3. Re-run opatchauto
sudo $ORACLE_HOME/OPatch/opatchauto apply ${PATCH_TOP} -outofplace -silent ./clone.propertiesQuick Checklist
ls -la /u01/app/oracle/product/19.23.0.0/dbhome_1/
grep "19.23.0.0" /u01/app/oraInventory/ContentsXML/inventory.xml
cat /etc/oratab | grep 19.23
ps -ef | grep pmon
rm -rf /u01/app/oracle/product/19.23.0.0/dbhome_1
sudo $ORACLE_HOME/OPatch/opatchauto apply ${PATCH_TOP} -outofplace -silent ./clone.properties