How To Install prometheus-node-exporter on Debian 12

Learn how to install prometheus-node-exporter on Debian 12 with this tutorial. prometheus-node-exporter is Prometheus exporter for machine metrics

Introduction

In this tutorial we learn how to install prometheus-node-exporter on Debian 12.

What is prometheus-node-exporter

prometheus-node-exporter is:

Prometheus exporter for machine metrics, written in Go with pluggable metric collectors.

There are three methods to install prometheus-node-exporter on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install prometheus-node-exporter Using apt-get

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

sudo apt-get update

After updating apt database, We can install prometheus-node-exporter using apt-get by running the following command:

sudo apt-get -y install prometheus-node-exporter

Install prometheus-node-exporter Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install prometheus-node-exporter using apt by running the following command:

sudo apt -y install prometheus-node-exporter

Install prometheus-node-exporter 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install prometheus-node-exporter using aptitude by running the following command:

sudo aptitude -y install prometheus-node-exporter

How To Uninstall prometheus-node-exporter on Debian 12

To uninstall only the prometheus-node-exporter package we can use the following command:

sudo apt-get remove prometheus-node-exporter

Uninstall prometheus-node-exporter And Its Dependencies

To uninstall prometheus-node-exporter and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove prometheus-node-exporter

Remove prometheus-node-exporter Configurations and Data

To remove prometheus-node-exporter configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge prometheus-node-exporter

Remove prometheus-node-exporter configuration, data, and all of its dependencies

We can use the following command to remove prometheus-node-exporter configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge prometheus-node-exporter

Dependencies

prometheus-node-exporter have the following dependencies:

References

Summary

In this tutorial we learn how to install prometheus-node-exporter package on Debian 12 using different package management tools: apt, apt-get and aptitude.