RHEL8/Fedora - yum/dnf causes cannot download repodata/repomd.xml for docker-ce
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
The cannot download repodata/repomd.xml error usually means dnf or yum is pointing at a Docker repository URL that does not match your distribution, release, or current network trust settings. On RHEL and Fedora, the fix is usually to verify the configured Docker CE repository, clear stale metadata, and confirm that your distro version is actually supported by the repository path you are using.
Check the Docker CE Repository URL First
The fastest diagnostic step is to inspect the repo file:
For Fedora, Docker's official repository is typically the Fedora path:
For RHEL, the official repository path is the RHEL one:
If the file points to the wrong distro family or an outdated copied URL, repomd.xml downloads will fail even though the machine has network connectivity.
Clean Metadata and Retry
If the repository URL is correct, clear cached metadata before testing again:
This forces dnf to fetch fresh metadata instead of retrying broken cached state.
It is a simple step, but it often separates a stale-cache problem from a real repository problem.
Verify Release and Support Mismatch
This error is common when the machine is on a Fedora release that Docker has not yet published packages for, or when a RHEL system is using a repo definition copied from another distribution.
Check the effective release:
If the repo path expects a supported release but your system is newer or mismatched, dnf may request metadata that simply is not there yet.
In that case, the real fix is not another dnf clean. The real fix is to use the correct official repo for that distribution or wait until packages for that release are published.
Watch for TLS, Proxy, and Corporate Network Issues
If the repo URL is correct but downloads still fail, test the endpoint directly:
On enterprise networks, SSL interception, custom proxies, or restrictive firewalls can block metadata retrieval even when the repo file itself is valid. That is especially common on RHEL systems in managed environments.
Recreate the Repo Cleanly
If the repository file has been edited repeatedly, it is often easier to remove it and re-add it from the official source:
Use the Fedora URL on Fedora and the RHEL URL on RHEL. Mixing them is one of the simplest ways to trigger the missing repomd.xml error.
Common Pitfalls
- Using a Fedora repo file on RHEL, or a RHEL repo file on Fedora, is a very common cause of the error.
- A repo URL can be syntactically valid and still fail because the distribution release is not supported yet.
- Cached metadata can preserve a bad state until you explicitly clean it.
- Network proxies, TLS inspection, or firewall rules can make the error look like a repo misconfiguration when it is really a connectivity problem.
Summary
- Start by confirming the Docker CE repo URL matches your actual distribution.
- Clean
dnfmetadata and rebuild the cache before retesting. - Verify that your Fedora or RHEL release is supported by the repository path you configured.
- If the repo file is suspect, recreate it from the official Docker repository definition for that distro.
Related reading
- Rights to read /dev/tty0 from pod
- rke kubernetes - node reboot
- Root password inside a Docker container
- Run a Docker image as a container
- Run a NOT headless chrome on a docker container
- Run a script in Dockerfile
- Run a script when docker is stopped
- Run Database as Docker container or on a bare metal server?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.