Tutorial - Resolving "Not using downloaded repomd.xml because it is older than what we have" yum error | Vevioz Developers

Tutorial Resolving "Not using downloaded repomd.xml because it is older than what we have" yum error

DevOps

Linux Systems Engineer
Joined
Oct 18, 2019
Messages
219
Reaction score
23
Points
18
Location
Novosibirsk, Russia
Website
addons.vevioz.com
Offline
Sometimes when running yum check-update on a CentOS system, yum will complain about a particular repomd.xml file being out of date. You might see output like this:
Code:
[root@host ~]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink
 * base: centos-distro.cavecreek.net
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: linux.cc.lehigh.edu
 * updates: reflector.westga.edu
base
extras
updates
Not using downloaded updates/repomd.xml because it is older than what we have:
  Current   : Thu Jul 16 09:45:59 2020
  Downloaded: Thu Jun 25 14:10:47 2020

This message can appear for any active repository on your system:

Code:
Not using downloaded base/repomd.xml because it is older than what we have
Not using downloaded epel/repomd.xml because it is older than what we have
Not using downloaded extras/repomd.xml because it is older than what we have
...etc

What's going on?​

Notices about old repomd.xml files usually indicate one of three problems:

  • The repository mirror has stale or outdated files. Not all mirrors get refreshed on the same schedule; sometimes yum will pick one that hasn't obtained new files since you last checked for updates. (This appears to be more prevalent with CentOS 8 mirror trees.)
  • A caching proxy sits between you and the repository mirror, and that proxy is serving you outdated files. Many CentOS mirrors operate over plain HTTP, so the files can be cached by intermediaries.
  • Your system clock is significantly incorrect.

The solution​

As root, run yum clean metadata. This will remove a variety of cache files from within /var/cache/yum, including the most recent mirror list and XML definition for each repository. Fresh copies of these metadata files will be fetched the next time you run yum check-update.

Code:
[root@host ~]# yum clean metadata
Loaded plugins: fastestmirror
Cleaning repos: base epel extras updates
24 metadata files removed
16 sqlite files removed
0 metadata files removed
At this point, you should be able to run yum check-update successfully, but there's a chance that yum will choose the same problematic mirror again. If this occurs, you can either repeat the yum clean metadata process until things work.
 
Top Bottom