📖 ~1 min read
Table of contents
Symptom & Impact
Running dnf update or dnf makecache fails with metadata errors, timeouts, or 404 responses from configured repositories.
Environment & Reproduction
Run: dnf repolist -v, dnf clean all, and curl -I to the repo baseurl to confirm DNS and HTTPS reachability.
Root Cause Analysis
Cached metadata is stale, mirror URL is invalid, or proxy/SSL inspection breaks repository access for RHEL 9 hosts.
Quick Triage
Clear cache and rebuild: sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf makecache. Validate /etc/yum.repos.d files.
Step-by-Step Diagnosis
Capture the failing dnf output showing repomd.xml or metalink failures for troubleshooting records.

Solution – Primary Fix
After fixes, dnf makecache completes and repositories show current metadata timestamps.
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
Run sudo dnf check-update and confirm package lists are returned without metadata warnings.
Verification & Acceptance Criteria
Pin trusted mirrors, keep CA bundles current, and schedule a periodic dnf makecache timer in stable networks.
Rollback Plan
Restore previous repo files from backup and re-run dnf clean all if a new repository definition caused the failure.
Prevention & Hardening
Use Ansible to template /etc/yum.repos.d files and run dnf cache rebuild handlers after repo changes.
Related Errors & Cross-Refs
Review /var/log/dnf.log and journalctl -u dnf-makecache for detailed metadata download failures.
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
Escalate with failing command output, repo file snippets, and network path results to your repository provider.
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.