The cart is empty

Repairing Repositories in CentOS 7: Transition to Vault Repositories After the End of Official Support

With the official support for CentOS 7 ending in June 2024, the standard repositories such as baseOS, updates, and extras, which were previously used for installing and updating packages, have ceased to function. This means that common update commands like yum update or yum install may no longer work correctly. However, for users who still rely on CentOS 7, there is a solution in the form of Vault repositories, which allow continued use of the system without official updates.

Why Are Standard Repositories No Longer Working?

CentOS 7, as a long-term supported operating system, had its repositories available on a network of mirrors that provided access to packages for installation and updates. After the end of support, however, these repositories were moved to the Vault, an archive where older versions of packages and repositories that are no longer officially updated are stored.

Vault repositories are primarily intended for users who, for some reason, cannot immediately transition to a newer version of the operating system but still need access to CentOS 7 packages and repositories. However, this approach does not provide any new security updates or bug fixes.

How to Fix Repositories and Switch to Vault?

If you encounter issues with non-functional repositories after the end of CentOS 7 support, you can switch to Vault repositories, which will allow you to continue installing and managing packages on your system. Follow these steps:

1. Backup the current repository files
First, create a backup of the existing repository files so that they can be restored if needed.

sudo cp -r /etc/yum.repos.d /etc/yum.repos.d.backup

2. Modify the existing repositories
Now, we will modify the existing repository files so that they use the Vault repositories instead of the inaccessible mirrors. This ensures that yum can find and download packages.

Run the following command to modify all repository files in /etc/yum.repos.d/:

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

3. Manual modification of repository files
Alternatively, you can manually edit the repository files. Below is an example modification for the CentOS-Base.repo file:

[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

After editing and saving the file, the system should be able to download packages from the Vault repositories.


Switching to Vault repositories is a necessary step for all CentOS 7 users who want to continue using this system after the end of official support. Although Vault repositories do not offer new updates, they allow the system to remain operational. However, it is recommended to plan a migration to a newer supported version of the operating system, such as CentOS Stream, Rocky Linux, or AlmaLinux, as soon as possible to ensure the security and currency of the system.