What is the difference between yum update and yum upgrade?

Life Sayings

Member
Registered
Joined
Nov 9, 2013
Messages
59
Points
8
What is the difference between yum update and yum upgrade in CentOS, and when should I use one over the other? Does any one explain me?
 

RDO Servers

Well-known member
Registered
Joined
Apr 3, 2015
Messages
1,027
Points
83
They are very similar.

yum update and yum upgrade will update all packages on the server.

The difference is, yum upgrade will also remove any packages that are flagged a obsolete.
 

robert4u

Member
Hosting Provider
Registered
Joined
May 30, 2017
Messages
57
Points
8
yum update is better option because yum upgrade removes obsolete packages which can cause problem if you are using any of such package.
 

racksandcloud

Well-known member
Registered
Joined
May 18, 2017
Messages
89
Points
0
yum upgrade forces the removal of obsolete packages, while yum update may or may not also do this. The removal of obsolete packages can be risky because it may remove packages that you use.

we recommend yum update because it is safer option.
 

dnsme

Active member
Hosting Provider
Registered
Joined
May 20, 2017
Messages
82
Points
8
yum upgrade forces the removal of obsolete packages (install new version)
yum update UPDATE packages

In many cases, an upgrade is not recommended.
 

vicsylicious

Member
Registered
Joined
Sep 2, 2017
Messages
15
Points
0
They actually do exactly the same thing, unless you modify the obsoletes setting in yum.conf.
1 is the default and they are the same and both do obsoletes.
0 means that upgrade does handle obsoletes and update doesn't.
 

Waqass

Member
Hosting Provider
Registered
Joined
Mar 6, 2016
Messages
61
Points
8
Waqass
It this correct that they both execute in similar fashion as most of the guys above are saying yum upgrade will force to remove obsolete programs.
 
Latest Threads
Replies
1
Views
26
Replies
0
Views
189
Replies
1
Views
40
Replies
2
Views
83
Recommended Threads
Replies
5
Views
5,806
Replies
4
Views
4,461
Replies
5
Views
1,691
Replies
12
Views
6,068

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top