How to Uninstall the DigitalOcean Metrics Agent

Validated on 1 May 2026 • Last edited on 12 May 2026

DigitalOcean Monitoring is a free, opt-in service that helps you track Droplet resource usage, view performance metrics, and receive alerts. The DigitalOcean metrics agent is an open-source Go utility that collects and sends system metrics to DigitalOcean to enable features such as usage graphs, alerts, and custom metrics.

If you no longer need to monitor your Droplet’s metrics, you can uninstall the metrics agent with your system’s package manager and remove its repository configuration.

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.

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:

cat /etc/os-release

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

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

Uninstall Metrics Agent on Ubuntu or Debian

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

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.

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.

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 metric agents repository, also remove the repository configuration like this:

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

This command produces no output if it succeeds. To confirm that the file was removed, run the following command to check whether the repository file still exists:

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 prints the echo message to confirm it:

...
Repo successfully removed

Uninstall Metrics Agent on CentOS and Fedora

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

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:

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:

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

Then, if you installed the agent using the metrics agent repository, remove the repository configuration by deleting the YUM repository file:

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

This command produces no output if it succeeds. To confirm that the file was removed, run the following command to check whether the repository file still exists:

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

The command prints an echo message to confirm that the file was removed successfully:

...
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:

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:

Unit do-agent.service could not be found.

If the do-agent service still appears or is listed as active, repeat the uninstallation steps or contact support for assistance.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.