Fix Error: Failed to download metadata for repo 'appstream' - CentOS 8

Originally published at: 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.…

1 Like

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.

1 Like

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

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.

1 Like

Welcome to the community!

Migrating from CentOS 8 to CentOS Stream 8 using the provided commands:

Open a terminal on your CentOS 8 system.
Run the following command to migrate to CentOS Stream 8:
Copy code
dnf --disablerepo ‘*’ --enablerepo=extras swap centos-linux-repos centos-stream-repos
Once the migration is complete, run the following command to synchronize the packages:
Copy code
dnf distro-sync
For migrating to alternative distros, you mentioned Rocky Linux. To migrate from CentOS 8 or CentOS Stream 8 to Rocky Linux, you can follow a specific guide provided by the Rocky Linux community or project. It’s important to refer to the official documentation or guides provided by the respective alternative distributions for the most up-to-date and accurate instructions.

Rachel Gomez

If you just want to install packages on Centos 8 without upgrading to CentOS 8 Stream, type

# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
# sed -i 's|#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-Linux-*

Now you can run something like:
# dnf install --assumeyes epel-release
root@admin-linux]# dnf install --assumeyes epel-release
CentOS Linux 8 - AppStream                      3.6 MB/s | 8.4 MB     00:02
CentOS Linux 8 - BaseOS                         2.3 MB/s | 4.6 MB     00:01
CentOS Linux 8 - Extras                         9.5 kB/s |  10 kB     00:01
Dependencies resolved.
1 Like