How to remove agent using AgentCleanupTool?

The AgentCleanupTool is used to completely remove the agent from Windows and Mac machines. Unlike uninstalling from the Control Panel or deleting from Applications folder, this tool ensures all files, folders, services, and scheduled tasks related to the agent are fully removed.

    When should you use AgentCleanup tool?

  • Your server has been shut down or decommissioned, and you still need to remove agents from machines.
  • You already tried to uninstall the agent from the Control Panel or System Preferences, but some parts were left behind.
  • The agent is stuck, broken, or you cannot manage it from the console anymore.
Important
  • On-Premises customers: You must run AgentCleanupTool.exe on the machine where Endpoint Central server is installed. The tool needs to read data from the server to work correctly.
  • If the server is already uninstalled: Contact ManageEngine Support with an agent registry export. Support will provide the AgentCleanupClient configured for your environment.
  • Agent uninstallation
    • Endpoint Central Cloud customers: You do not have access to a server machine. Please contact ManageEngine Support with an agent registry export from any one managed machine. Support will provide the required cleanup files directly.

Step 1: Download AgentCleanupTool and Generate Cleanup Files

This step is done on your Endpoint Central server machine.

Important
This tool is not available inside the product interface. You must download it from this page.

Downloading the AgentCleanupTool

  • Download the
  • Save the file to a convenient location on the server machine.
Agent uninstallation

Run AgentCleanupTool.exe on the Server

  • On the server machine, navigate to the folder where you saved AgentCleanupTool.exe.
  • Right-click AgentCleanupTool.exe and select "Run as administrator".:
    Agent uninstallation

      Wait for the tool to complete. On success, it will generate two files in the same directory:

    • AgentCleanupToolClient.exe — Used to clean up agents on Windows machines.
    • UEMS_MacAgent_UninstallInfo.plist — Used (along with a separate .pkg) to clean up agents on Mac machines.
    • Agent uninstallation
Important
You only need to generate these files once per server. The AgentCleanupToolClient.exe generated from your server can be used to clean up all computers managed under that server — just copy and run it on each machine within the 48-hour window. If the files expire before you finish, run AgentCleanupTool.exe again on the server to get a fresh set.

Step2: Uninstalling the agent

Uninstall Windows agent using Agent cleanup tool

  • Copy AgentCleanupToolClient.exe (generated in Step 1) to any location on the target machine. Do not place it in the agent installation directory or rename the file.
  • Right-click AgentCleanupToolClient.exe and select "Run as administrator".
  • Wait for the cleanup to complete. A success message will confirm the agent has been removed.
Agent uninstallation
Agent uninstallation

Uninstall Mac agent using Agent cleanup tool

  • Download UEMS_MacAgent_Cleanup_Tool.pkg
  • Copy both UEMS_MacAgent_UninstallInfo.plist (generated in Step 1) and UEMS_MacAgent_Cleanup_Tool.pkg to the target Mac machine.
  • Double-click UEMS_MacAgent_Cleanup_Tool.pkg to launch the installer.
  • Follow the on-screen prompts. When prompted, enter your Mac admin password to authorize the cleanup.
  • Wait for the installer to complete. The agent will be fully removed.
  • Agent uninstallation
    Agent uninstallation
Important
  1. 48 hour expiry: The generated files (AgentCleanupToolClient.exe and UEMS_MacAgent_UninstallInfo.plist) are valid for 48 hours only. If they expire, return to Step 1 and regenerate them.
  2. Do not rename files: The cleanup tools validate file names internally. Renaming any file will cause the cleanup to fail.
  3. Do not run from the agent directory: Never execute AgentCleanupToolClient.exe from inside the agent installation folder (e.g., C:\Program Files (x86)\ManageEngineUEMS-Agent\).
  4. Server-side removal: The cleanup tool removes only the agent from the endpoint. To also remove the computer entry from the server, navigate to Agent > Computers, select the computers, and click Remove Computers.

Keywords: Uninstall Agents, Endpoint Central Agent Uninstallation, Agent Uninstallation.