How to Uninstall the DigitalOcean Metrics Agent

Last verified 23 Nov 2026

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.

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

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.

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 metrics agent repository, also remove the repository configuration:

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:

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:

Repo successfully removed

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!

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 repository file was removed, run:

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:

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 for your operating system or contact support for assistance.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.