Fix – Error: Failed to download metadata for repo appstream – CentOS 8
Previously, we looked at What CentOS alternative distro should you choose? That article was posted before End of Life (EOL) for CentOS 8 – December 31st, 2021. CentOS 8 will NOT automatically migrate to the next version (CentOS Stream 8). There will be no more updates to CentOS 8.
Error: Failed to download metadata for repo ‘appstream’ – CentOS 8
If you still manage systems running CentOS 8 and you attempt to update packages using
dnf update or
yum update, you will encounter the following error:
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Fix: Migrate to CentOS Stream 8 or an alternative distro
Now that CentOS has shifted to Stream – a rolling-release Linux distribution, midstream between the upstream development in Fedora and the downstream development for RHEL – many users are moving to CentOS alternatives. Others have decided to stick with CentOS by migrating to CentOS Stream 8. Both of these choices will resolve not being able to update CentOS 8.
To migrate from CentOS 8 to CentOS Stream 8, run the following commands:
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
Migrating to alternative distros is usually just as simple:
For example, follow this guide to migrate from CentOS 8 or CentOS Stream 8 to Rocky Linux. Also, see this list of CentOS 8 alternatives.
I was wondering what was up with this. Had no idea they stopped updates for CentOS 8. I am pretty late to this news it seems.
They didn’t really give a reason why, not from what I can see. I guess they just wanted to end the project? Maybe someone else will pick it back up in the future. Good to know it will be archived but I likely won’t return to it after this since it is very likely to become increasingly unstable and unsafe to use as time goes on.
Thanks for the list and recommendations of alternatives! Just saved me time looking around.
Thanks!! Thank you! It worked for me.
Welcome to the community. Thanks for taking the time to let us know this still works.
Thank you very much. I am new to Linux and this issue was driving me crazy reading all the posts related to why my dhclient / DHCP wasn’t working or file was not found etc…
Hopefully, this new upgrade should be the fix I was searching for.
Welcome to the community!