SvennD
Auto upgrade on CentOS Stream 8 using dnf-automatic
July 22, 2021

Auto upgrade on CentOS Stream 8 using dnf-automatic

Posted on July 22, 2021  •  1 minutes  • 169 words  •  Suggest Changes

I wrote a short guide on how to set up automatic updates/upgrades on CentOS 6 and 7, sadly in CentOS Stream 8, this no longer works. Even though yum is still working, it won’t find anything providing yum-cron.

[root@centos8 ~]# yum search yum-cron
Last metadata expiration check: 0:12:24 ago on Thu 22 Jul 2021 10:36:32 AM CEST.
No matches found.
[root@centos8 ~]# yum whatprovides yum-cron
Last metadata expiration check: 0:12:29 ago on Thu 22 Jul 2021 10:36:32 AM CEST.
Error: No Matches found

So let’s install the alternative : dnf-automatic

yum install dnf-automatic

Then check & change the config :

nano /etc/dnf/automatic.conf

I, for one want to apply all updates, this is a server and I definitely don’t log in daily to check for updates. (I even think its a weird default)

# change to yes
apply_updates = yes

Then activate the timer to run it :

systemctl enable --now dnf-automatic-install.timer

Check if the timer is installed fine :

systemctl list-timers

more info : https://dnf.readthedocs.io/en/latest/automatic.html

Hastle free updates 🙂

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper