π ~1 min read
Table of contents
Symptom & Impact
On RHEL 9, DNF commands fail with stale metadata errors, checksum mismatch messages, or very old repo timestamps.
Environment & Reproduction
You may see ‘Failed to download metadata’, ‘repomd.xml’ checksum failures, or repeated slow package queries.
Root Cause Analysis
The local cache under /var/cache/dnf is out of sync with the currently enabled repositories or mirror content.
Quick Triage
Run ‘sudo dnf repolist -v’ and ‘sudo dnf makecache –refresh’ to confirm the exact repo and metadata status.
Step-by-Step Diagnosis
Use ‘sudo dnf clean all’ to remove cached metadata and package headers so DNF can rebuild safely.

Solution – Primary Fix
Run ‘sudo dnf makecache –refresh’ and then test with ‘sudo dnf check-update’ to verify clean metadata retrieval.
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
List enabled repos with ‘sudo dnf repolist –enabled’ and disable invalid entries from custom .repo files if needed.
Verification & Acceptance Criteria
If using Red Hat subscription repos, confirm registration with ‘sudo subscription-manager status’.
Rollback Plan
Validate DNS resolution and outbound proxy settings because network interception often breaks metadata checks.
Prevention & Hardening
If metadata is blocked by policy, inspect denials with ‘sudo ausearch -m avc -ts recent’ and review audit logs.
Related Errors & Cross-Refs
Use ‘sudo journalctl -u dnf-makecache –no-pager -n 100’ to inspect timer-driven cache refresh events.
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
Keep repository definitions minimal, avoid duplicate mirrors, and run periodic ‘dnf makecache –refresh’ in maintenance windows.
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.