Super User is a question and answer site for computer enthusiasts and power users. 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

I frequently use the following when updating/upgrading RPM-based distros (CentOS, RHEL, and Fedora in my case):

yum -y update && yum -y upgrade

However, I'm not sure exactly how the two yum commands differ.

What are the advantages of update over upgrade, and vice versa?

share|improve this question
up vote 7 down vote accepted

According to man yum:


If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. […]

If […] the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9.


Is the same as the update command with the --obsoletes flag set.

share|improve this answer
wow. My man-fu has failed me :|. Thank Diogo :) – warren Jun 6 '12 at 14:16
I imagine/hope OP already read the man page. What it results in is that upgrade will delete obsolete packages In practice, you generally use update or update <package name> for day to day stuff, and reserve upgrade for occasions where you are doing full system upgrade to a new distribution version. – UpAndAdam Jun 6 '12 at 15:19
More detail on ServerFault here: – degenerate Jul 2 '14 at 21:26

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.