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?
3 Answers
You really should have a look at yum
's manpage. The commands to accomplish what you asked for are:
yum clean
yum makecache
-
1
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
.
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)
.