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.

What is the difference between yum update and yum upgrade, and when should I use one over the other?

share|improve this question

2 Answers 2

up vote 19 down vote accepted

yum upgrade forces the removal of obsolete packages, yum update may or may not also do this. From man yum:

update

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. (See Specifying package names for more information) If the packages or globs specified match to packages which are not currently installed then update will not install them. update operates on groups, files, provides and filelists just like the "install" command. If the main obsoletes configure option is true (default) or 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.

upgrade

Is the same as the update command with the --obsoletes flag set. See update for more details.

The removal of obsolete packages can be risky, as it may remove packages that you use.

share|improve this answer
    
Even more detail on ServerFault here: serverfault.com/a/298158/88886 –  degenerate Jul 2 at 21:27

yum upgrade and yum update will perform the same function that update to the latest current version of package.

But the difference is Upgrade will delete obsolete packages, while update will preserve them.

share|improve this answer

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.