How to efficiently use Yum offline
Post
Cancel

How to efficiently use Yum offline

I use Fedora on my laptop, and at first I had a couple of problems with yum, which seems to always believe you’re connected to the Internet. There a special switch: -C, but it didn’t work all the time with me. I was used to apt-get before, which updates its metadata only if you tell it to (via apt-get update). To configure yum to behave the same way, add:

1
metadata_expire=99999999

to your /etc/yum.conf. This way, yum will not try to update its metadata all the time. But beware! You’ll need to do that yourself when you have access to the Internet, using:

1
# yum makecache

Which is the equivalent of apt-get update.

Edit years later: this tip was useful for early versions of yum, its new behavior is way nicer to offline computers, and is no longer really needed.

This post is licensed under CC BY 4.0 by the author.