How to Remove the DigitalOcean Metrics Agent Package or Repository from Droplets

DigitalOcean Monitoring is a free, opt-in service that gathers and displays metrics about Droplet-level resource utilization. Monitoring supports configurable alert policies with integrated email and Slack notifications to help you track the operational health of your infrastructure.


Remove the Metrics Agent

If you no longer wish to use the metrics agent, you can remove the package using your native package manager.

On Debian-based operating systems (like Ubuntu), use apt-get:

sudo apt-get purge do-agent

On RHEL-based operating systems (like CentOS and Fedora), use yum:

sudo yum remove do-agent

The service will be stopped and the package will be removed from your system. You can reinstall the metrics agent in the future by reinstalling the do-agent package with your package manager (for example, apt-get install do-agent or yum install do-agent).

Remove the Metrics Agent Repository

To remove the metrics agent repository from your Droplet, delete the repository configuration file.

On Ubuntu and Debian Droplets:

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

On CentOS or Fedora Droplets:

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

The metrics agent repository configuration will be removed from your Droplet. You can reinstall the metrics agent in the future by running the installation script, which will add the repository to your Droplet again.