How To Apply Updates Automatically With dnf-automatic In RHEL, AlmaLinux And Rocky Linux [2023]

Tutorial To Apply Updates Automatically With dnf-automatic In RHEL, AlmaLinux, And Rocky Linux

In this tutorial post, we will show you the method to apply updates automatically with dnf-automatic in Redhat Linux, AlmaLinux, and Rocky Linux.

How To Apply Updates Automatically With dnf-automatic In RHEL, AlmaLinux, And Rocky Linux [2023]

At first, we need to install dnf-automatic tool.

Install dnf-automatic

As dnf-automatic is available in the default repositories of RHEL and its clones, you can easily install dnf-automatic in RHEL,  Stream, Fedora, CentOS, AlmaLinux, and Rocky Linux, with the help of the following command.

sudo dnf install dnf-automatic

How To Apply Updates Automatically with dnf-automatic

At first, you need to edit dnf-automatic default configuration file. Open it using your favorite editor:

sudo nano /etc/dnf/automatic.conf

And you need adjust the three important settings as given below:

upgrade_type = default
[...]
download_updates = yes
[...]
apply_updates = no
[...]


Notes:
upgrade_type – There are two types of updates and They are “default” And “security“.  “default“, value for all upgrades and “security“, value for the security upgrades.

download_updates – If the value is set to “yes“, the updates will be downloaded. If the value is set as “no“, the updates will not be downloaded.

apply_updates – If it is set to “yes”, the updates will be applied when available. If it is set to “no”, the updates will not be applied.

Now run the following command. The following command will enable the timer unit.

sudo systemctl enable --now dnf-automatic.timer

Now the updates are downloaded and installed (if enabled) automatically when they are available.

READ More Relevant Stuff:  How To Remove Primary Account From Chromebook 2023

Leave a Reply

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