This post briefly outlines how it possible to re-create the yum cache, or said in another way, force a fetch of the cache data from the enabled yum repositories.
The enabled yum repositories are the ones in the following file /etc/yum.conf or in the following folder /etc/yum.repos.d that have their “enabled” setting to “1“, e.g. :
# vi /etc/yum.repos.d/test.repo [test_repo] name=Test Repo baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
Run the following command on the CentOS/RHEL machine :
# yum makecache
It will re-download all the cache data from the enabled repositories.