In this blog I have explain how easily we can de-install or remove all components of Oracle Management Agent.

The five steps involved in this process are:

  1. Prerequisites for De-installing Oracle Management Agents.
  2. Deinstall the plug-in homes.
  3. Deinstall the sbin home.
  4. Deinstall the Management Agent.
  5. Delete Agent Base Directory.

The most important point to remember, is the order in which these steps have to be performed. If the order is not correct then de-install process will result in failure.
So, you have to perform these steps in the same order as mentioned above.

Next Important thing which you one should be familiar with, are the paths involved in this process.

  1. Plug-in Home              {/app/oracle/product/agent12c/plugins}
  2. Agent Home                 {/app/oracle/product/agent12c/core/12.1.0.4.0}
  3. oraInst Location        {/app/oracle/product/agent12c/core/12.1.0.4.0/oraInst.loc}
  4. SBIN Directory           {/app/oracle/product/agent12c/sbin}
  5. Agent Oracle Home  {/app/oracle/product/agent12c/core/12.1.0.4.0}

Make sure your Environment variables are set properly before proceeding further.

Prerequisites for De-installing Oracle Management Agents.
—————————————————————————-
Make sure you stop agent and delete targets before you de-install a Management Agent.

  • Stop the Management Agent first, if it is already down, then proceed with next step.
              $<AGENT_HOME>/bin/emctl stop agent

Wait for the Management Agent to go to the down or unreachable state in the Cloud Control console. If it is already in the down or unreachable state, then go to the next step.

  • Delete the Management Agent targets and their monitored targets (from any host where EM CLI is installed):
               ./emcli delete_target -name=”example.com:1836″ -type=”oracle_emd” –delete_monitored_targets

Once the prerequisites are met, proceed with de-installing other components.

De-install the plug-in homes:
————————————–
Navigate to “$<AGENT_HOME>/oui/bin” location and execute below mentioned command.

./runInstaller -deinstall -silent “REMOVE_HOMES={absolute_path_to_plug-in_home}” ORACLE_HOME=<absolute_path_to_agent_home> [-removeallfiles] [-invPtrLoc <absolute_path_to_oraInst.loc>]

For Example:

 ./runInstaller -deinstall -silent “REMOVE_HOMES={/app/oracle/product/agent12c/plugins/oracle.sysman.emas.oms.plugin_12.1.0.2.0}”
ORACLE_HOME=/app/oracle/product/agent12c/core/12.1.0.4.0 -removeAllFiles
-invPtrLoc /app/oracle/product/agent12c/core/12.1.0.4.0/oraInst.loc

Please note that the “-invPtrLoc” parameter is only supported on UNIX platforms, and not on Microsoft Windows platforms.

NOTE:  To de-install multiple plug-ins at the same time, enter the plug-in homes separated by a comma.

For example,

 ./runInstaller -deinstall -silent “REMOVE_HOMES={/app/oracle/product/agent12c/plugins/oracle.sysman.emas.oms.plugin_12.1.0.2.0,
/app/oracle/product/agent12c/plugins/oracle.sysman.emct.oms.plugin_12.1.0.2.0}”
ORACLE_HOME=/app/oracle/product/agent12c/core/12.1.0.4.0 -removeAllFiles
-invPtrLoc /app/oracle/product/agent12c/core/12.1.0.4.0/oraInst.loc

Deinstall the sbin home:
——————————–

Navigate to “$<AGENT_HOME>/oui/bin” location and execute below mentioned command.

./runInstaller -deinstall -silent “REMOVE_HOMES={absolute_path_to_sbin_directory}” ORACLE_HOME=<absolute_path_to_agent_home> [-removeAllFiles] [-invPtrLoc <absolute_path_to_oraInst.loc>]

Deinstall the Management Agent:
——————————————-

Navigate to “$<AGENT_HOME>/oui/bin” location and execute below mentioned command.

./runInstaller -deinstall -silent “REMOVE_HOMES={absolute_path_to_agent_oracle_home}” ORACLE_HOME=<absolute_path_to_agent_home> -removeAllFiles -invPtrLoc <absolute_path_to_oraInst.loc>

Manually delete the agent base directory.
——————————————————

For UNIX/LINUX platforms:

rm -rf <absolute_path_to_install_base_dir>

Oracle Management Agent and its components has been finally removed from your machine.

I hope I was able to explain in a way making it simple for you to understand the process.