24 Deinstalling Oracle Management Agents

This chapter describes how you can deinstall standalone Oracle Management Agents (Management Agent). In particular, this chapter covers the following:


On a cluster, ensure that you deinstall the Management Agents from all the nodes one by one. To do so, follow the instructions outlined in this chapter.


When you deinstall an old standalone Management Agent and install a new standalone Management Agent on the same host, you will lose all historical target information from the Management Repository.

To avoid losing all historical target information, first install the new standalone Management Agent, then run the emcli relocate_targets command to hand over the targets from the old standalone Management Agent to the new standalone Management Agent, and then deinstall the old standalone Management Agent.

For information about the emcli relocate_targets command, see the Oracle Enterprise Manager Cloud Control Command Line Interface Guide.

24.1 Deinstalling Oracle Management Agents

This section lists the deinstallation prerequisites and describes the various ways of deinstalling a standalone Management Agent. In particular, this section covers the following:

24.1.1 Deinstalling Standalone Oracle Management Agents

This section describes the following: Deinstalling Standalone Management Agents Using the AgentDeinstall.pl Script

To deinstall a standalone Management Agent using the AgentDeinstall.pl script, follow these steps:

  1. Invoke the AgentDeinstall.pl script to delete the standalone Management Agent and also remove the agent base directory.

    $<AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/AgentDeinstall.pl -agentHome <AGENT_HOME>

    For example,

    /u01/software/em13c/agentbasedir/agent_13. /u01/software/em13c/agentbasedir/agent_13. -agentHome /u01/software/em13c/agentbasedir/agent_13.

  2. Manually remove the targets, which were being monitored by the standalone Management Agent you deinstalled, from the Enterprise Manager Cloud Control Console. To do so, run the following EM CTL command from any host where EM CLI is installed.

    emcli delete_target




    For example,

    emcli delete_target




  3. Manually delete the agent base directory. For information on agent base directory, see Section 2.3.4.

    For UNIX platforms:

    rm -rf <absolute_path_to_install_base_dir>

    For Microsoft Windows platforms:

    del <absolute_path_to_install_base_dir>


While deinstalling the standalone Management Agent, the Management Agent service is not removed automatically. You must remove it manually after the deinstall, by running the following command:

sc delete <service_name> Deinstalling Shared Agents

To deinstall a Shared Agent, run the following command from the Master Agent home that is visible on the host where your Shared Agent is installed:

$<AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/NFSAgentDeInstall.pl AGENT_INSTANCE_HOME=<absolute_path_to_agent_instance_home> ORACLE_HOME=<absolute_path_to_agent_home>

For example,

/shared/app/agentbasedir/agent_13. /shared/app/agentbasedir/agent_13. AGENT_INSTANCE_HOME=/shared/app/agentbasedir/agent_inst ORACLE_HOME=/shared/app/agentbasedir/agent_13. Deinstalling Standalone Management Agents Installed Using an RPM File

To deinstall a standalone Management Agent that was installed using a .rpm file, ensure that you have Resource Package Manager (RPM) installed on the Management Agent host, then follow these steps:

  1. Run the following command on the Management Agent host to obtain the RPM name:

    rpm -qa | grep oracle-agt

  2. Run the following command as a root user to deinstall the Management Agent:

    rpm -e <rpm_name>

    Here, <rpm_name> is the RPM name that is displayed in the output of the command you ran in Step 1.

24.1.2 After Deinstalling Standalone Management Agents

After you deinstall a standalone Management Agent, follow these steps:

  1. Verify that the Oracle homes you deinstalled are deregistered from the central inventory. However, some files might still remain in these Oracle homes. If they do, you can manually delete them.

    You must also manually delete the auto-startup script called gcstartup that will be present under /etc/init.d directory.


    These auto-start scripts are not available on Microsoft Windows.
  2. If you deinstalled on a Microsoft Windows platform, then follow these steps to remove the entries from the Microsoft Windows registry. Ensure that you are logged in as a user with Administrator privileges on that host.

    1. Start the registry editor by selecting Start and then Run. Type regedit and click OK.

    2. In the Registry Editor window, in the left pane, expand HKEY_LOCAL_MACHINE, SOFTWARE, and then Oracle. Under the Oracle directory, delete the following:

      (a) KEY_agent12gn

      (b) KEY_sbin12gn


      Here, n refers to a numeral indicating the agent instance. For example, KEY_sbin12g9 for the first agent installation.
    3. Expand HKEY_LOCAL_MACHINE, SOFTWARE, Oracle, and then Sysman. Under the Sysman directory, delete the Management Agent service. For example, Oracleagent12g9Agent.

    4. Expand HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, and then Services. Under the Services directory, delete the Management Agent keys.

    5. Expand HKEY_LOCAL_MACHINE, SYSTEM, ControlSet002, and then Services. Under the Services directory, delete the Management Agent service.

    6. Close the registry editor.

24.2 Deinstalling or Undeploying Only Plug-ins from the Oracle Management Agent

If you want to deinstall or undeploy only the plug-ins from the Management Agent, and not the Management Agent itself, then use the Plug-ins page within the Enterprise Manager Cloud Control Console. For instructions, see the Oracle Enterprise Manager Cloud Control Administrator's Guide. Do NOT use the installer to undeploy only the plug-ins.