📖 ~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

Running dnf install or dnf update returns metadata download errors and package operations stop.

Environment & Reproduction

DNS, proxy, mirror timeout, or stale cache in /var/cache/dnf can break metadata retrieval on RHEL 9.

Root Cause Analysis

Run: sudo dnf repolist -v and sudo dnf makecache –refresh to confirm which repository fails.

Quick Triage

Confirm network and DNS first: ping -c 3 cdn.redhat.com and getent hosts cdn.redhat.com.

Step-by-Step Diagnosis

Capture the exact dnf stderr lines to identify if this is timeout, SSL, or repo configuration related.

Illustrative mockup for rhel-9 — rhel9-dnf-metadata-error-01.webp
DNF fails while refreshing repository metadata — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Use cache cleanup and rebuild commands in sequence before retrying package installation.

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-dnf-clean-makecache-02.webp
Using dnf clean all and dnf makecache to recover — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Run: sudo dnf clean all && sudo rm -rf /var/cache/dnf/* to remove stale metadata.

Verification & Acceptance Criteria

Run: sudo dnf makecache –refresh and verify repository metadata downloads complete.

Rollback Plan

Retry: sudo dnf update -y. If needed, temporarily disable the failing repo with –disablerepo.

Prevention & Hardening

Confirm success by installing a small package: sudo dnf install -y jq.

Keep repo definitions clean and avoid mixed third-party repos that conflict with RHEL base channels.

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

Re-enable previously disabled repos with dnf config-manager and re-run dnf repolist.

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.