Repository Metadata Expiration

yum repolist enabled -v shows a "Repo-expire" field, but I don't see the value configured in any .repo files in /etc/yum.repos.d

I checked /etc/yum.conf and no luck finding a corresponding value there either.

I've read all over the man page and come up empty-handed, but maybe I missed it?

I just want to know how yum knows when it's time to update repo metadata and how it accomplishes that (I know you can yum clean; I mean how it occurs "automatically" in RHEL 7 to ensure proper metadata)

Send help.
  • post-author-pic
    Brandon B


    While I don't have firsthand knowledge using that variable, I did find this on the yum.conf man page:
    Time (in seconds) after which the metadata will expire. So that if the current metadata downloaded is less than this many seconds old then yum will not update the metadata against the repository. If you find that yum is not downloading information on updates as often as you would like lower the value of this option. You can also change from the default of using seconds to using days, hours or minutes by appending a d, h or m respectively. The default is 6 hours, to compliment yum-updatesd running once an hour. It's also possible to use the word "never", meaning that the metadata will never expire. Note that when using a metalink file the metalink must always be newer than the metadata for the repository, due to the validation, so this timeout also applies to the metalink file.

  • post-author-pic
    Jake W

    Perfect. I was only checking the yum man page and not the yum.conf man page. This is exactly what I needed. Thanks

Looking For Team Training?

Learn More