Fix Error: Failed to download metadata for repo ‘appstream’ – CentOS 8

As we all know, CentOS 8 reached its End of Life (EOL) on December 31, 2021, and CentOS Linux 7 will reach its end of life (EOL) on June 30, 2024, marking a significant shift in the CentOS ecosystem. This transition to CentOS Stream leaves system administrators and users with some important decisions to make.

In a previous article, we discussed alternative distros for those seeking CentOS alternatives. That article was published before the End of Life (EOL) for CentOS 8 – December 31st, 2021. CentOS 8 does not automatically migrate to the next version (CentOS Stream 8). There will be no more updates to CentOS 8.

In this article, we will discuss a common error when attempting to update packages using dnf update or yum update and how to resolve it. Whether you’re considering migrating to CentOS Stream or exploring alternative options, addressing this issue is crucial for maintaining the security and stability of your CentOS systems. Let’s explore the fix and ensure your systems continue to operate smoothly.


Error: Failed to download metadata for repo ‘appstream’ – CentOS 8

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
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 CentOS 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. In contrast, others have decided to stick with CentOS by migrating to CentOS Stream.

To migrate from CentOS 8 to CentOS Stream, follow these steps:

  • Step 1: Disable the existing repositories and enable the CentOS Stream 8 repositories with the following command:
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos

This command switches your system from the CentOS Linux repositories to the CentOS Stream repositories.

  • Step 2: Perform a distribution synchronization to apply the changes:
dnf distro-sync

This command synchronizes your system with the packages available in the CentOS Stream repositories. Following these steps will migrate your CentOS 8 system to CentOS Stream, allowing you to continue receiving updates and support.



In the ever-evolving landscape of Linux distributions, the transition from CentOS 8 to CentOS Stream has brought about important changes. The “Error: Failed to download metadata for repo ‘appstream'” issue, which can arise during updates on CentOS 8, is a challenge that system administrators and users may encounter.

By following the steps outlined in this article, you can effectively address this issue and ensure the continued functionality and security of your CentOS-based systems. Migrating to CentOS Stream or alternative Linux server distros will enable you to maintain an up-to-date and reliable server environment.

As CentOS continues its journey as CentOS Stream, staying informed about the latest developments and best practices is crucial. Stay vigilant by performing routine system maintenance to ensure the ongoing resilience and responsiveness of your servers in meeting your requirements.

We hope this guide has been valuable in assisting you with resolving the ‘appstream’ metadata download error and navigating the evolving CentOS ecosystem. Remember, adaptability and knowledge are keys in IT, and with the right tools and information, you can overcome challenges and keep your systems running smoothly.

Tags: , , , ,


  1. 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.

  2. Thanks!! Thank you! It worked for me.

  3. Welcome to the community. Thanks for taking the time to let us know this still works. :handshake:

  4. 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.

  5. Welcome to the community!

Top ↑