---
title: How to Uninstall the DigitalOcean Metrics Agent
description: Uninstall the DigitalOcean metrics agent from your Droplet to stop collecting enhanced metrics and remove related system resources.
product: Insights
url: https://docs.digitalocean.com/products/insights/how-to/uninstall-metrics-agent/
last_updated: "2026-11-23"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Uninstall the DigitalOcean Metrics Agent

DigitalOcean Insights provides metrics, logs, traces, dashboards, and alerts to help you monitor, analyze, and troubleshoot supported DigitalOcean resources.

To stop collecting enhanced Droplet metrics in Insights, uninstall the metrics agent using your system’s package manager and remove its repository configuration. Uninstalling the agent also affects resource alerts that depend on agent-collected metrics.

**Note**:

  The DigitalOcean metrics agent collects and sends system telemetry data for monitoring and alerts. It does not collect or transmit Customer Content. After you uninstall the agent, we keep historical data for 90 days, and then delete it.

  GPU Droplets have the metrics agent selected by default. To remove it, see [How to Uninstall the DigitalOcean Metrics Agent](https://docs.digitalocean.com/products/insights/how-to/uninstall-metrics-agent/index.html.md).

## Check Your Droplet’s Operating System

The package manager you use to install the metrics agent depends on your operating system. For example, Ubuntu and Debian use `apt`, while CentOS and Fedora use `yum`. Each package manager uses its own repository format and setup process.

To check your Droplet’s operating system, run the following command:

```shell
cat /etc/os-release
```

For example, if your Droplet uses Ubuntu, you should see output similar to this:

```text
...
PRETTY_NAME="Ubuntu 22.04.4 LTS"
VERSION_ID="22.04"
```

## Uninstall Metrics Agent

You can uninstall the DigitalOcean metrics agent (`do-agent`) from your Droplet to stop collecting enhanced system metrics. The uninstallation process varies depending on your Droplet’s operating system.

### Ubuntu or Debian

To remove the metrics agent, remove the `do-agent` package and all associated configuration files like this:

```shell
sudo apt-get purge do-agent
```

A prompt appears if `apt` finds the `do-agent` package and is ready to remove it and its configuration files. When prompted, type `Y`, and then press `ENTER`.

```text
The following packages will be REMOVED:
  do-agent*
...
After this operation, 13.1 MB disk space will be freed.
Do you want to continue? [Y/n]
```

After you confirm, the output shows that the system removed the agent, deleted its configuration, and cleaned up related services. Warnings about stopping or disabling the service mean the service wasn’t running at the time of removal.

```text
Removing do-agent (3.17.1) ...
...
Removed '/etc/systemd/system/multi-user.target.wants/do-agent.service'.
...
Purging configuration files for do-agent (3.17.1) ...
...
Failed to stop do-agent.service: Unit do-agent.service not loaded.
Failed to disable unit: Unit do-agent.service does not exist
```

If you installed the agent [using the metrics agent repository](https://docs.digitalocean.com/products/insights/how-to/install-metrics-agent-repository/index.html.md), also remove the repository configuration:

```shell
sudo rm /etc/apt/sources.list.d/digitalocean-agent.list
```

This command produces no output if it succeeds. To confirm that the repository file was removed, run:

```shell
test -f /etc/apt/sources.list.d/digitalocean-agent.list && echo "Repo still exists" || echo "Repo successfully removed"
```

If the removal was successful, the command returns:

```text
Repo successfully removed
```

### CentOS or Fedora

To remove the metrics agent, remove the `do-agent` package from your system:

```shell
sudo yum remove do-agent
```

A prompt appears if `yum` finds the `do-agent` package and is ready to remove it. When prompted, type `Y`, and then press `ENTER`:

```text
Package        Arch    Version    Repository    Size
Removing:
 do-agent      x86_64  3.17.1-1   sonar         12.5 MiB
...

Transaction Summary:
 Removing: 1 package
...

Is this ok [y/N]:
```

After you confirm, the output shows that the system removed the agent from your Droplet:

```text
Running transaction
...
[2/2] Erasing do-agent-0:3.17.1-1.x86_64   100% | ... | ... | ...
Complete!
```

If you installed the agent [using the metrics agent repository](https://docs.digitalocean.com/products/insights/how-to/install-metrics-agent-repository/index.html.md), remove the repository configuration by deleting the YUM repository file:

```shell
sudo rm /etc/yum.repos.d/digitalocean-agent.repo
```

This command produces no output if it succeeds. To confirm that the repository file was removed, run:

```shell
test -f /etc/yum.repos.d/digitalocean-agent.repo && echo "Repo still exists" || echo "Repo successfully removed"
```

If the removal was successful, the command returns:

```text
Repo successfully removed
```

## Verify Metrics Agent Uninstalled

To confirm that the metrics agent is fully removed from your Droplet, check the service status like this:

```shell
systemctl status do-agent
```

If the uninstallation was successful, the output confirms that the `do-agent` service no longer exists and the agent is fully removed from your Droplet:

```text
Unit do-agent.service could not be found.
```

If the `do-agent` service still appears or is listed as active, [repeat the uninstallation steps for your operating system](#uninstall-metrics-agent) or contact [support](https://cloudsupport.digitalocean.com) for assistance.