Welcome to the Ampere Developer blog series. We have a vast developer audience asking us a lot of great technical questions. We realized a blog to share our thoughts and responses would benefit the community. Check back frequently as we will post new content regularly!
As of January 31st, if you have been using CentOS 8 on servers, you will have noticed some new error messages when running dnf update.
[root@instance-20220310-1819 opc]# dnf update CentOS Linux 8 - AppStream 453 B/s | 38 B 00:00 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
The operating system was moved to end-of-life on December 31st officially, and as of late January is no longer receiving any updates. For people who have been depending on CentOS for a free, stable Linux distribution to run on your servers, the question is, what now? If you find yourself in this position, there are several options available to you.
What happened?
In December 2020, the CentOS project announced that it would move away from being a downstream rebuild of the Red Hat Enterprise Linux (RHEL) distribution, and toward being a distribution which would track just ahead of the next RHEL release. The project announced that it would stop releasing updated for CentOS 8 one year later, at the end of December 2021. The CentOS 8 repositories went offline a few weeks later, on January 31st 2022.


Migrating to CentOS Stream 8
The CentOS project has shifted its relationship with Red Hat Enterprise Linux from a downstream consumer of source packages to an upstream pre-release stream for the next version of Red Hat Enterprise Linux. If you want to stay with the CentOS project, and are looking for a Linux distribution which will prepare you for the next version of Red Hat Enterprise Linux, then migrating from CentOS 8 to CentOS Stream 8 is the simplest way to continue to receive updates and new features for your CentOS servers. The migration is a relatively painless process, which involves enabling the centos-release-stream package to point to the appropriate repositories of packages, swapping the CentOS Stream 8 repositories in for the CentOS 8 repositories, and syncing your distribution.sudo dnf -y --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos sudo dnf -y distro-sync
The second command will install and remove a number of packages and may take several minutes to complete.
Once this is complete, reboot your system, and you should now see “CentOS Stream release 8" in /etc/centos-release - your update is complete.
If you’re looking for a drop-in replacement to CentOS Linux which is a rebuild of Red Hat Enterprise Linux, check out Part 2: Moving from CentOS Linux to Alma Linux