
CentOS Linux 8 EOL: Restore Repositories and Plan Migration
Historical recovery guidance for CentOS Linux 8, which reached end of life on 31 December 2021. CentOS Stream 8 also ended on 31 May 2024.
A repository error on CentOS Linux 8 is not simply a broken mirror. The release is no longer maintained. Restoring access to its archived packages can help a controlled recovery or migration, but it does not restore security support.
Confirm which distribution is installed
cat /etc/os-release
cat /etc/centos-release
sudo dnf repolist --all
Distinguish CentOS Linux 8 from CentOS Stream 8 before editing repository files. They are different distributions and both are now end of life. The older advice to migrate CentOS Linux 8 to Stream 8 is no longer an appropriate supported destination.
Use the official archive only when recovery requires it
Back up /etc/yum.repos.d and review the enabled repositories individually. For a final CentOS Linux 8 installation, the official archive contains the 8.5.2111 content. A BaseOS stanza can use this form while keeping the installed distribution signing key and GPG verification:
[baseos]
name=CentOS Linux 8.5.2111 - BaseOS archive
baseurl=https://vault.centos.org/8.5.2111/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Edit the matching existing stanza rather than creating a second repository with the same ID. Remove or disable its obsolete mirrorlist/metalink entry. AppStream and extras use their corresponding archived paths; verify those directories in the official vault before changing them. Do not mix CentOS Linux and Stream archives or disable GPG checks to suppress an error.
sudo dnf clean metadata
sudo dnf makecache
sudo dnf repolist
Repository metadata loading proves access to the archive, not that the system is patched against current vulnerabilities. Avoid a blanket search-and-replace across every third-party repository, and do not immediately run a full upgrade without reviewing the proposed transaction.
Choose a supported migration path
For a new target, consider a currently supported enterprise distribution and the applicationsโ support requirements. A clean rebuild with a tested data/application restore can be easier to reason about than an in-place conversion. Red Hat provides Convert2RHEL guidance; other vendors provide their own conversion tools with explicit source/target restrictions.
- Inventory packages, applications, databases, repositories, drivers and integration dependencies.
- Confirm that the selected vendor tool supports the exact installed minor release and intended target.
- Take a recoverable application/data backup and rehearse the migration on an isolated copy.
- Download conversion tools only from their official project, review them and plan a rollback before running as root.
- Validate networking, identities, storage, services and application behavior before decommissioning the old system.
Do not treat changing repository URLs or running distro-sync as a general major-version migration method. Keep the old host isolated as appropriate until a supported replacement is accepted.
References
- CentOS Project: CentOS Linux end of life
- CentOS Project: Linux and Stream lifecycle
- CentOS official vault
- Red Hat: Convert2RHEL