How to manage automatic updates in Debian 10

Whenever critical data is stored on your system, the most important thing you need to do is keep it secure. To do this, you need to regularly install all the latest fixes and security updates. However, it is even more convenient if these fixes and updates are installed automatically. Fortunately, the Debian 10 auto-update utility successfully accomplishes this goal. Therefore, today we will discuss a method for managing automatic updates in Debian 10.

Configuring Automatic Updates on Debian 10

To manage automatic updates in Debian 10, you need to follow these steps:

First of all, you will need to start a terminal in Debian 10. After successfully starting the terminal, you are advised to do the following: update your system before installing any new packages. To do this, enter the following command in the terminal and press the Enter key:

sudo apt update

This command is shown in the image below:

Once this command is successful, you should be able to see the message shown in the following image in your terminal:

Service packs

Now you need to install the automatic update package. All you have to do in this regard is to type the following command in your terminal and then press the Enter key:

sudo apt install unattended-upgrades

This command is shown in the image below:

automatic updates

After successfully executing this command, you should be able to see the following message on your terminal:

Install automatic update package

The next thing you need to do is set up automatic updates by changing /etc/apt/apt.conf.d file. You can open this file with any text editor of your choice. However, in this example, we opened this file using the nano editor. To do this, you will need to enter the following command in your terminal and then press the Enter key:

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Pay special attention to the syntax of this command, as a mistake or mistake while entering this command may lead to incorrect results. This command is also shown in the image below:

Edit the automatic updates configuration file

Once this command is successful, the /etc/apt/apt.conf.d file will open in the nano editor. Now you need to scroll down to the lines shown in the following image and uncomment them by removing the “//” (two forward slashes) in front of these lines:

Update settings

After you uncomment these lines, press Ctrl + X to save your changes and exit the nano editor. Now that you have finished configuring automatic updates, the next thing you need to do is turn on automatic updates. To do this, enter the following command in the terminal and press the Enter key:

sudo dpkg-reconfigure --priority=low unattended-upgrades

This command is also shown in the image below:

reconfigure package

Upon successful execution of this command, a dialog box will be displayed on your terminal. Select the Yes option in this dialog box by pressing the Enter key, as shown in the following image:

Enable automatic updates

By now, automatic updates are enabled in your Debian 10. However, you also need to make sure the above process worked correctly or not. To do this, you need to check the status of your automatic updates. Type the following command in the terminal and press Enter:

sudo systemctl status unattended-upgrades.service

This command is also shown in the image below:

Check the status of the update service

Once this command is successful, you should be able to see the status of your automatic updates. The status Active (In Progress) means that your automatic updates have been successfully enabled, as shown in the following image:

Automatic updates are active

Now, if you want to disable automatic updates, enter the same command in your terminal that you entered to enable these updates and then press the Enter key. Once you have done this, a dialog box will appear on your terminal. This time, select the None option in this dialog box, and then press the Enter key to disable automatic updates, as shown in the image shown below:

Disable automatic updates

Once this command is successful, you should be able to see the message shown in the following image on your terminal:

Automatic updates disabled

Output

By following the method outlined in this article, you can easily manage automatic updates in Debian 10 and therefore keep your critical systems secure in the best possible way.

How to manage automatic updates in Debian 10

Sidebar