How To Install cron-apt on Debian 10

Learn how to install cron-apt on Debian 10 with this tutorial. cron-apt is automatic update of packages using apt-get

Introduction

In this tutorial we learn how to install cron-apt on Debian 10.

What is cron-apt

cron-apt is:

Contains a tool that is run by a cron job at regular intervals. By default it just updates the package list and downloads new packages without installing. You can instruct it to run anything that you can do with apt-get (or aptitude).

It can optionally send mail to the system administrator on errors, log to syslog or a separate log file.

Observe that this tool may be a security risk, so you should not set it to do more than necessary. Automatic upgrade of all packages is NOT recommended unless you are in full control of the package repository.

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

Install cron-apt Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install cron-apt

Install cron-apt Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install cron-apt

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

sudo aptitude -y install cron-apt

How To Uninstall cron-apt on Debian 10

To uninstall only the cron-apt package we can use the following command:

sudo apt-get remove cron-apt

Uninstall cron-apt And Its Dependencies

To uninstall cron-apt and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove cron-apt

Remove cron-apt Configurations and Data

To remove cron-apt configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge cron-apt

Remove cron-apt configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge cron-apt

Dependencies

cron-apt have the following dependencies:

References

Summary

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