Throughout this guide, you'll see how to fix the following error while running either yum update or yum upgrade:
Setting up Upgrade Process YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
This error occurred since CentOS 6 was declared End Of Life as per the CentOS lifecycle schedule on November 2020.
In order to fix the error on your VPS, you may run the following command on your VPS:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak && wget -O /etc/yum.repos.d/CentOS-Base.repo https://www.host-stage.net/hsmirrors/centos6repofix && yum clean all
The command will replace the old CentOS repository to the vault CentOS repository and reinstate the yum update possibility.