Deleting the Old OMS Home When the Central Agent Is Migrated to a Location Outside the Old Middleware Home

If you have already migrated the central agent to a location outside the old middleware home, first deinstall the central agent, and then you can directly remove the old OMS, or in other words the old middleware home. To do so, follow these steps:

Note:

To deinstall the central agent, refer Deinstalling Oracle Management Agents.

If your old OMS home version is 13c release 1, then ignore steps 1, 2, and follow only steps 3, 4.
  1. Detach the old OMS home.

    <OLD_ORACLE_HOME>/oui/bin/detachHome.sh -force -allDepHomes -silent ORACLE_HOME=<OLD_ORACLE_HOME> -waitForCompletion -invPtrLoc <OLD_ORACLE_HOME>/oraInst.loc

  2. Detach the Oracle common directory.

    <OLD_ORACLE_HOME>/oui/bin/detachHome.sh -force -allDepHomes -silent ORACLE_HOME=<OLD_MW_HOME>/oracle_common -waitForCompletion -invPtrLoc <OLD_MW_HOME>/oracle_common/oraInst.loc

  3. Check whether any processes are running from the old middleware home.

    ps -ef | grep <OLD_MW_HOME>

  4. If no processes are running from the old middleware home, then delete the old middleware home.

    rm -rf <OLD_MW_HOME>

    Note:

    During the process of detaching the home (step 1, 2), you may receive a message "The Oracle home '<oracle home>' could not be updated as it does not exist." You can ignore this message.