Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Fedora 15 and every time I try to install something with yum, yum tries to update the repository database.

For most people this would be great and handy, but I'm stuck behind super slow internet (well, kinda slow, something like 1 Mbps), and the update takes a minute or so. The database isn't large (a little over 2 mb for all of my repositories), but it adds up.

What is the best way to disable this automatic database update? I'm used to Ubuntu and apt where I have to manually tell apt to update the databases. I suppose I could install apt for Fedora, but I was wondering if there was a config setting somewhere that I could change.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

Passing -C to yum will tell it to only use the metadata in the current cache. Note that this will cause the operation to fail if it needs metadata that is not currently in the cache, or if the metadata from the various repositories are not in sync.

share|improve this answer
Can that be set in a config file somewhere? Passing -C every time may get tedious. I want to tell yum when to update the metadata. – tjameson Jul 31 '11 at 22:05
Unfortunately no. You will need to create an alias for it. – Ignacio Vazquez-Abrams Jul 31 '11 at 22:57
I suppose I can live with that. Thanks! – tjameson Aug 1 '11 at 18:21
How about a "fast yum" alias: alias yumin='yum -C --noplugins' – rsenna Nov 17 '13 at 4:52

"... Can that be set in a config file somewhere? Passing -C every time may get tedious. ..."

Update YUM config file and set metadata_expire variable to a higher value (default is 90 mins.) You can then use yum makecache command to manually update the metadata as and when required.

share|improve this answer

Here is my answer from :

Temporary Solution:

Use -C flag:

sudo yum install foobar -C

Permanent solution:

Use the metadata_expire flag in your yum.conf to control this.

Edit /etc/yum.conf and set


You can use d, h or m to configure the time in days, hours, or minutes.

Bonus: here is the documentation:

metadata_expire is 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. Also note that "never" does not override "yum clean expire-cache"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.