How To Install ntpsec-ntpdig on Debian 12

Learn how to install ntpsec-ntpdig on Debian 12 with this tutorial. ntpsec-ntpdig is ntpdig SNTP client

Introduction

In this tutorial we learn how to install ntpsec-ntpdig on Debian 12.

What is ntpsec-ntpdig

ntpsec-ntpdig is:

NTP, the Network Time Protocol, is used to keep computer clocks accurate by synchronizing them over the Internet or a local network, or by following an accurate hardware receiver that interprets GPS, DCF-77, or similar time signals.

ntpdig can be used as an SNTP client to query a NTP or SNTP server and either display the time or set the local system’s time. It is not sufficient, however, for maintaining an accurate clock in the long run.

This is the NTPsec version of ntpdig, which is equivalent to the sntp utility. NTPsec is a secure, hardened, and improved implementation derived from the original NTP project.

There are three methods to install ntpsec-ntpdig 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 ntpsec-ntpdig Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install ntpsec-ntpdig

Install ntpsec-ntpdig Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ntpsec-ntpdig

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

sudo aptitude -y install ntpsec-ntpdig

How To Uninstall ntpsec-ntpdig on Debian 12

To uninstall only the ntpsec-ntpdig package we can use the following command:

sudo apt-get remove ntpsec-ntpdig

Uninstall ntpsec-ntpdig And Its Dependencies

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

sudo apt-get -y autoremove ntpsec-ntpdig

Remove ntpsec-ntpdig Configurations and Data

To remove ntpsec-ntpdig configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge ntpsec-ntpdig

Remove ntpsec-ntpdig configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ntpsec-ntpdig

Dependencies

ntpsec-ntpdig have the following dependencies:

References

Summary

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