Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Debian's apt-get update fetches and updates the package index. Because I'm used to this way of doing things, I was surprised to find that yum update does all that and upgrades the system. This made me curious of how to update the package index without installing anything.

share|improve this question
add comment

2 Answers 2

up vote 22 down vote accepted

The check-update command will refresh the package index and check for available updates:

yum check-update
share|improve this answer
add comment

While "yum check-update" will refresh the local cache, if it needs to be refreshed, so will most other commands.

The command that's strictly the equivalent of "apt-get update" is "yum makecache" ... however it's generally not recommended to run that directly, in yum.

share|improve this answer
    
I don't understand the first sentence. Can you rephrase maybe? –  Tshepang Feb 8 '11 at 18:06
2  
It means that other yum commands, e.g. yum upgrade will automatically run yum check-update if necessary. In other words, yum upgrade is basically the same as apt-get update; apt-get upgrade. –  Mikel Feb 8 '11 at 21:02
    
Thank you! yum check-update did not helps me against 404 errors. But yum makecache helps! HUGE thanks! –  socketpair Jun 6 at 11:41
add comment

Your Answer

 
discard

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.