π ~1 min read
Table of contents
Symptom & Impact
dnf update is slow and repeatedly reports expired metadata on every run.
Environment & Reproduction
Run dnf repolist and dnf makecache –timer to confirm cache behavior.
Root Cause Analysis
Check whether the issue affects all repositories or only one custom repo.
Quick Triage
metadata_expire is set too low or mirror sync is inconsistent.
Step-by-Step Diagnosis
Review /etc/yum.repos.d/*.repo and adjust metadata_expire to a sane value.

Solution – Primary Fix
Run dnf clean all && dnf makecache, then test dnf update again.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use systemctl status dnf-makecache.timer and systemctl list-timers.
Verification & Acceptance Criteria
Verify outbound HTTPS to repo hosts and correct proxy settings if used.
Rollback Plan
If custom scripts touch repo files, verify labels with restorecon -Rv /etc/yum.repos.d.
Prevention & Hardening
Review journalctl -u dnf-makecache and /var/log/dnf.log for timing errors.
Related Errors & Cross-Refs
Use consistent repository sources and keep mirror definitions centrally managed.
Related tutorial: View the step-by-step tutorial for rhel-9.
View all rhel-9 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Restore the previous .repo files from backup and rerun dnf clean all.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.