I have seen and used all of these commands to upgrade packages on my system, but why are there different commands for this? Do they all not do the same thing? And if not, then in which situations would it be better to use a specific one of them?

These are the commands I mean:

  • sudo apt-get upgrade

  • sudo apt-get dist-upgrade

  • sudo apt full-upgrade

I have already looked at this, but it does not answer my question about the command sudo apt full-upgrade: What is "dist-upgrade" and why does it upgrade more than "upgrade"?

share|improve this question
1  
possible duplicate of What is "dist-upgrade" and why does it upgrade more than "upgrade"? – muru Apr 5 '15 at 19:43
    
see also - manpages.ubuntu.com/manpages/utopic/man8/apt-get.8.html all the options are clearly explained on the man page – Panther Apr 5 '15 at 19:45
1  
@bodhi.zazen see manpages.ubuntu.com/manpages/utopic/man8/apt.8.html – muru Apr 5 '15 at 19:50
up vote 9 down vote accepted

No, they don't the the same thing.

sudo apt-get update updates the list of packages. Do this before you use sudo apt-get upgrade or sudo apt-get dist-upgrade because if the list isn't updated, they won't do anything.

sudo apt-get upgrade upgrades your packages but doesn't remove or install any other packages.

sudo apt-get dist-upgrade upgrades your packages and installs or removes other packages to resolve dependencies so all packages are up-to-date.

sudo apt full-upgrade does the same thing as sudo apt-get dist-upgrade

share|improve this answer
1  
What about sudo apt full-upgrade then? – Paranoid Panda Apr 5 '15 at 19:46
    
@Toroidal same as apt-get dist-upgrade. – muru Apr 5 '15 at 19:47

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.