Error: Failed to download metadata for repo 'appstream' (dnf / yum)
dnf/yum can’t fetch a repository’s metadata — the mirror is unreachable, the repo URL is dead (CentOS 8 EOL), or there’s a DNS/proxy problem.
Seen on:
Linux
Meaning
CentOS 8 reached end of life and its mirrors moved to vault.centos.org, breaking every repo. Other causes are network/proxy issues, expired repo GPG/SSL, or a typo in a .repo file.
Common causes
- CentOS 8 / Stream 8 end-of-life (mirrorlist gone)
- No network/DNS or proxy not configured for dnf
- Broken third-party .repo file
- Clock skew breaking HTTPS
⚡ Quick fix
- Migrate to a supported OS (Rocky/Alma/Stream 9) or point repos at vault.centos.org
- Check connectivity/proxy in /etc/dnf/dnf.conf
- Disable the broken repo: dnf --disablerepo=<id>
Detailed fix by platform
RHEL
- bash
sudo dnf clean all sudo dnf repolist -v sudo sed -i 's/mirrorlist/#mirrorlist/; s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/CentOS-*.repo # CentOS 8 only
How to diagnose
- OS — cat /etc/os-release (EOL?)
- Network — curl -I the repo URL
- Repo — Which repo id fails?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- dpkg lock E: Could not get lock /var/lib/dpkg/lock-frontend — is another process using it?
- dpkg was interrupted E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem
- held broken packages Unmet dependencies / E: Unable to correct problems, you have held broken packages
Most viewed in Linux
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026