Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the equivalent command for sudo apt-get update in redha/fedora/centost? I mean how can I refresh and download the list of softwares on the repository?

share|improve this question
up vote 1 down vote accepted

You really should have a look at yum's manpage. The commands to accomplish what you asked for are:

yum clean
yum makecache
share|improve this answer
1 – Matt Feb 17 '13 at 10:25

Yum refreshes its cached data automatically if it has been more than 90 minutes since the necessary data was last fetched. And it only downloads the needed data, instead of everything possible. So in general you don't need to do this manually.

If you really want to cache the data manually, use yum clean all followed by yum makecache.

share|improve this answer

Yum refreshes its cache(s) automatically, the time a cache is considered valid is given in /etc/yum.conf, or much more commonly, in /etc/yum.repos.d/ in each repository configuration (expire_cache=). To force just to revalidate caches and update next time yum is run, do yum clean expire-cache. The other yum clean subcommand relevant is yum clean metadata (delete all information on available packages).

Note that ỳum clean all does delete all data in the cache, forcing a full download the next time. This can take quite some time.

The gory details are in the manual pages for yum(8).

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.