πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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.

Illustrative mockup for rhel-9 β€” rhel9-b10-226-repo-check.webp
Checking enabled repositories and metadata timers on RHEL 9 β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for rhel-9 β€” rhel9-b10-226-dnf-clean.webp
Refreshing DNF cache and validating package availability β€” Illustrative mockup β€” Progressive Robot

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.

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.