Auto upgrade on CentOS Stream 8 using dnf-automatic

Posted 22 July, 2021

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.

[[email protected] ~]# 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.
[[email protected] ~]# 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 🙂


Show Comments (0)
© SvennD