Okay, but what does that actually mean?
It means that remote index of packages is downloaded to local file cache, in order to speed up subsequent dnf
commands.
Why do repo caches need to be updated every hour?
This is done for convenience and speedup of dnf
command. Any time you run e.g. dnf install
command, it needs to have a "fresh" metadata for repositories. Without it, there are high chances of having to wait for metadata refresh when you run dnf
commands interactively.
Note that, despite timer being set to every 1 hr, the effective runtime is no more often than every 3 hrs.
This is rather a bug, which is detailed here.
Wouldn't this happen anyways if using update manually with dnf update?
Yes, by default it would happen anyways if metadata is considered stale. That is, exceeded default lifetime of 6 hrs (per-repo definition can override this TTL). It would never happen for a repo if its definition has metadata_expire=-1
.
Would dnf update fail or not get the newest versions if dnf-makecache hasn't been refreshing?
No, it would not fail. Although you can say that it could be slightly more reliable provided that metadata is already there and network connection is unstable.
Or is this something that compliments dnf-automatic and isn't needed if not using automatic?
It complements both dnf
and dnf-automatic
because both will have higher chance on being run with fresh metadata cache in place, and thus running faster.
Negatives / Cons to disabling this timer with systemctl disable dnf-makecache.timer and systemctl stop dnf-makecache.timer?
Slower dnf
commands / interactive waiting for installation and updates.
Unless you follow up with the article and adjust:
metadata_timer_sync=3600
the timer is quite ineffective and won't do much benefit.
P.S. you ask many questions but in this communities, you should typically ask one :)
Please consult man dnf
and man dnf.conf
. Those who right documentation, should not do so in vain.