24.07.2025

Fix Inactive Repositories in CentOS 8 After EOL

If you're using CentOS 8, you may have noticed that standard repositories are no longer accessible - updates and installations begin to fail with repository errors. This happens because CentOS 8 reached its End of Life (EOL) on December 31, 2021, and official mirrors have since been archived or removed.

In this guide, you'll learn how to restore repository access in CentOS 8 by replacing inactive URLs with vault or alternative archive mirrors, allowing you to continue using yum for package management.

If you encounter this error, we recommend switching to the current OS - OEL 8.

If for some reason you cannot switch OS, then to correct this error, it is enough to enter 2 commands:

sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Done!

FAQ