How To Install htpdate on Debian 11

In this tutorial we learn how to install htpdate on Debian 11. htpdate is HTTP based time synchronization tool

Introduction

In this tutorial we learn how to install htpdate on Debian 11.

What is htpdate

htpdate is:

The HTTP Time Protocol (HTP) is used to synchronize a computer’s time with web servers as reference time source. This program can be used instead ntpdate or similar, in networks that has a firewall blocking the NTP port.

Htpdate will synchronize the computer time to Greenwich Mean Time (GMT), using the timestamps from HTTP headers found in web servers response (the HEAD method will be used to get the information).

Htpdate works through proxy servers. Accuracy of htpdate will be usually within 0.5 seconds (better with multiple servers).

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

Install htpdate Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install htpdate

Install htpdate Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install htpdate using apt by running the following command:

sudo apt -y install htpdate

Install htpdate 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 htpdate using aptitude by running the following command:

sudo aptitude -y install htpdate

How To Uninstall htpdate on Debian 11

To uninstall only the htpdate package we can use the following command:

sudo apt-get remove htpdate

Uninstall htpdate And Its Dependencies

To uninstall htpdate and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove htpdate

Remove htpdate Configurations and Data

To remove htpdate configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge htpdate

Remove htpdate configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge htpdate

Dependencies

htpdate have the following dependencies:

References

Summary

In this tutorial we learn how to install htpdate package on Debian 11 using different package management tools: apt, apt-get and aptitude.