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?


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.

  • wow. My man-fu has failed me :|. Thank Diogo :) – warren Jun 6 '12 at 14:16
  • 1
    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: serverfault.com/a/298158/88886 – degenerate Jul 2 '14 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.