This post is also available in:
You deleted an Oracle Home directory manually — to free up space or recreate it later — and now inventory.xml still has the entry sitting there. Since the directory is gone, deinstall won’t work. The Oracle-supported fix is runInstaller -detachHome.
💡 If the Oracle Home directory still exists on disk and you want to remove everything (binaries + inventory entry), this is not the right procedure. See: Removing an Old Oracle GRID_HOME After an Upgrade.
Why not edit inventory.xml directly?
Oracle does not support manual edits to inventory.xml. Any inconsistency introduced by hand can corrupt the central inventory and cause failures in future installations or upgrades.
Prerequisites
- Another valid, working Oracle Home on the server —
runInstallermust be called from a different home than the one being removed - Read access to
inventory.xmlto get the exact home name
1. Identify the ORACLE_HOME in inventory.xml
cat /u01/app/oraInventory/ContentsXML/inventory.xmlExample output:
<HOME_LIST>
<HOME NAME="Orasidb19c_home1_4607" LOC="/u01/app/oracle/product/19.23.0.0/dbhome_1" TYPE="O" IDX="10"/>
<HOME NAME="Orasidb19c_home1_9789" LOC="/u01/app/oracle/product/19.25.0.0/dbhome_1" TYPE="O" IDX="12"/>
<HOME NAME="Orasidb19c_home1_2380" LOC="/u01/app/oracle/product/19.26.0.0/dbhome_1" TYPE="O" IDX="14"/>
</HOME_LIST>You need two values from the entry you want to remove:
LOC→ the Oracle Home pathNAME→ the home name in the inventory (case-sensitive)
2. Pick a valid Oracle Home to run runInstaller from
⚠️ runInstaller must be called from a home other than the one being removed. Using the same home you are detaching will cause the command to fail or behave unpredictably.
In the example above, the home to remove is Orasidb19c_home1_2380. We will call runInstaller from Orasidb19c_home1_9789:
export RUNNER_HOME=/u01/app/oracle/product/19.25.0.0/dbhome_13. Run detachHome
$RUNNER_HOME/oui/bin/runInstaller \
-silent \
-detachHome \
ORACLE_HOME="/u01/app/oracle/product/19.26.0.0/dbhome_1" \
ORACLE_HOME_NAME="Orasidb19c_home1_2380"💡 The values for
ORACLE_HOMEandORACLE_HOME_NAMEmust match exactly what is ininventory.xml. Copy them directly from the file to avoid typos.
4. Validate the result
cat /u01/app/oraInventory/ContentsXML/inventory.xmlUnlike deinstall, runInstaller -detachHome removes the entry completely from inventory.xml — it will not appear at all, not even with REMOVED="T".
Quick Reference
cat /u01/app/oraInventory/ContentsXML/inventory.xml
export RUNNER_HOME=/u01/app/oracle/product/19.25.0.0/dbhome_1
$RUNNER_HOME/oui/bin/runInstaller \
-silent \
-detachHome \
ORACLE_HOME="/u01/app/oracle/product/19.26.0.0/dbhome_1" \
ORACLE_HOME_NAME="Orasidb19c_home1_2380"
cat /u01/app/oraInventory/ContentsXML/inventory.xmlFAQ
Is it safe to edit inventory.xml by hand? No. Oracle does not support manual changes to this file. Always use runInstaller -detachHome.
Do I need to reboot the server? Generally no. But confirm no processes are using that home before running the command:
fuser -cu /u01/app/oracle/product/19.26.0.0/dbhome_1What is the difference between deinstall and runInstaller -detachHome?
deinstall | runInstaller -detachHome | |
|---|---|---|
| Removes binaries from disk | ✅ Yes | ❌ No |
| Updates inventory.xml | ✅ Yes (marks REMOVED="T") | ✅ Yes (removes entry completely) |
| Works without the directory | ❌ No | ✅ Yes |
| Oracle-supported | ✅ Yes | ✅ Yes |
