> This page location: /docs.md > /docs/management.md > /docs/cloud-manager.md > /docs/cloud-manager/tutorial/nav/mongodb-agent.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Remove Legacy Agents

The legacy Backup and Monitoring Agents can be removed after the MongoDB Agent has been [installed.](https://www.mongodb.com/docs/cloud-manager/tutorial/nav/install-mongodb-agent.md)

## Remove the Backup Agent from Cloud Manager

### Remove from Cloud Manager

To remove a Backup Agent from Cloud Manager, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-backup-agent.md#std-label-stop-backup-agent) and then wait 24 hours.

### Delete from the Server

To delete the Backup Agent **from a Linux or macOS server**, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-backup-agent.md#std-label-stop-backup-agent) and then remove the `mongodb-mms-backup-agent` file from the `/usr/bin` directory. If you installed the agent using a `tar.gz` file, the agent will be in the directory you chose during installation.

To delete the Backup Agent **from a Windows server**, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-backup-agent.md#std-label-stop-backup-agent-windows) and then use the Windows program uninstaller to remove the `MongoDB Backup Agent` program.

## Remove Monitoring Agents from Cloud Manager

### Remove from Cloud Manager

To remove a Monitoring Agent from Cloud Manager, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-monitoring-agent.md#std-label-stop-monitoring-agent) and then wait 5 minutes.

When an agent fails to ping Cloud Manager for 5 minutes, Cloud Manager views the agent as inactive and distributes the agent's assignments to other agents (if available).

**Note:**

The All Agents page  displays an inactive agent for 24 hours before Cloud Manager removes it from the page.

### Delete from the Server

To delete the Monitoring Agent **from a Linux or macOS server**, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-monitoring-agent.md#std-label-stop-monitoring-agent) and then remove the `mongodb-mms-monitoring-agent` file from the `/usr/bin` directory. If you installed the agent using a `tar.gz` file, the agent will be in the directory you chose during installation.

To delete the Monitoring Agent **from a Windows server**, [stop the agent](https://www.mongodb.com/docs/cloud-manager/tutorial/start-or-stop-monitoring-agent.md#std-label-stop-monitoring-agent-windows) and then use the Windows program uninstaller to remove the `MongoDB Monitoring Agent` program.
