How To Install collectd-dev on Ubuntu 18.04

In this tutorial we learn how to install collectd-dev on Ubuntu 18.04. collectd-dev is statistics collection and monitoring daemon (development files)

Introduction

In this tutorial we learn how to install collectd-dev on Ubuntu 18.04.

What is collectd-dev

collectd-dev is:

collectd is a small daemon which collects system information periodically and provides mechanisms to monitor and store the values in a variety of ways. Since the daemon doesn’t need to startup every time it wants to update the values it’s very fast and easy on the system. Also, the statistics are very fine grained since the files are updated every 10 seconds by default.

This package contains the development files needed to create your own plugins.

There are three methods to install collectd-dev on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install collectd-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install collectd-dev using apt-get by running the following command:

sudo apt-get -y install collectd-dev

Install collectd-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install collectd-dev using apt by running the following command:

sudo apt -y install collectd-dev

Install collectd-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install collectd-dev using aptitude by running the following command:

sudo aptitude -y install collectd-dev

How To Uninstall collectd-dev on Ubuntu 18.04

To uninstall only the collectd-dev package we can use the following command:

sudo apt-get remove collectd-dev

Uninstall collectd-dev And Its Dependencies

To uninstall collectd-dev and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove collectd-dev

Remove collectd-dev Configurations and Data

To remove collectd-dev configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge collectd-dev

Remove collectd-dev configuration, data, and all of its dependencies

We can use the following command to remove collectd-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge collectd-dev

References

Summary

In this tutorial we learn how to install collectd-dev package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.