Updated: 28 September 2026 · Applies to: CentOS 6, 7 and 8 (vault.centos.org)
CentOS 6, 7 and 8 are end of life, and their packages moved from the normal mirrors to the archive at vault.centos.org. That is why yum shows errors such as All mirror URLs are not using ftp, http[s] or file or Could not resolve host: mirrorlist.centos.org.
Point yum to the vault
Back up the repository files, then disable the mirror lists and use the vault:
cp -a /etc/yum.repos.d /root/yum.repos.d.bak sed -i 's/^mirrorlist=/#mirrorlist=/' /etc/yum.repos.d/CentOS-*.repo sed -i 's|^#\?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/CentOS-*.repo yum clean all && yum makecache
This works for CentOS 6, 7 and 8 (on CentOS 8 use dnf). The archive keeps the last release of each version (6.10, 7.9.2009 and 8.5.2111).
Note: This only makes existing packages installable again: the vault gets no security updates. Use it to install what you need for a migration, and move to AlmaLinux or Rocky Linux as soon as possible (see "Upgrade from CentOS 6 to CentOS 7" and "How to migrate from CentOS to Oracle Linux?").