How To Set Up Automatic Updates On Ubuntu 22.04 LTS

How To Set Up Automatic Updates On Ubuntu 22.04 LTS

Set Up Automatic Updates On Ubuntu 22.04 LTS

Are you tired of manually updating your Ubuntu or missing out on the important updates like security patches and other critical updates then this Ubuntu tutorial post is for you as we will show you steps to set up automatic updates on Ubuntu 22.04 LTS? This tutorial is also valid for the Ubuntu 20.04 LTS and Ubuntu 18.04 LTS.

How To Set Up Automatic Updates On Ubuntu 22.04 LTS

The quick way of enabling/disabling stable automatic updates is by running the following command.

sudo dpkg-reconfigure -plow unattended-upgrades

In another method, let’s the help of tools to set up automatic updates on Ubuntu and the tool that we are going to use is unattended-upgrades package. Open your terminal and run the following command to install the unattended-upgrades package tool on Ubuntu.

sudo apt install unattended-upgrades

You don’t need to worry as after the installation is complete, the Unattended Upgrades service will start automatically. Just in case run the following command to verify it.

systemctl status unattended-upgrades

Now, Go through the following steps to enable the automatic update. You need to configure the file /etc/apt/apt.conf.d/20auto-upgrades to enable the automatic update. These two lines must be there for automatic updates.

APT::Periodic:Update-Package-Lists"1";
APT::Periodic::Unattended-Upgrade"1";

The above configuration updates the package list and installs available updates every day but if you want to delay the update process then add the following line.

APT::Periodic::AutocleanInterval"10";

 

READ More Relevant Stuff:  How To Install Inkscape In Ubuntu 18.04

By default, Only the security updates will be updated automatically.  Meanwhile, if you want to customize the automatic update process like If you want to disable certain packages from being automatically updated then you can do it by editing /etc/aptF/apt.conf.d/50unattended-upgrades file.

For example:

You need to list packages on the Package-blacklist If you want to disable certain packages from being automatically updated:

Unattended-Upgrade::Package-Blacklist{
//     "libc6-dev";
//      "libc6-i686";

It also has interesting features like receiving an email if there is a problem with the automatic update on Ubuntu 22.04

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *