Dnf can't be prevented from trying to update metadata

dnf makecache was ran yesterday.

dnf.conf

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
metadata_expire=-1
metadata_timer_sync=0
check_config_file_age=False

1 Like

Check the status of dnf-makecache.timer:

systemctl status dnf-makecache.timer

And disable and stop it if it is active:

sudo systemctl disable --now dnf-makecache.timer
1 Like

I my case the repository that is trying to update is updates which has metadata_expire=6h at /etc/yum.repos.d/fedora-updates.repo. I think that is over writing global config and removing it will prevent this issue.

2 Likes

or set it to a longer time, like /etc/yum.repos.d/fedora.repo has metadata_expire=7d