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

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 (e.g., 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.