The difference between the different APT upgrade commands

15,963

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 performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

Share:
15,963

Related videos on Youtube

Community
Author by

Community

Updated on September 18, 2022

Comments

  • Community
    Community over 1 year

    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"?

  • Admin
    Admin about 9 years
    What about sudo apt full-upgrade then?
  • Mohammad Kholghi
    Mohammad Kholghi over 4 years
    Does sudo apt-get dist-upgrade, upgrade the linux to a newer release?
  • UTF-8
    UTF-8 over 4 years
    No, that's what sudo do-release-upgrade does. But you should definitely run sudo apt-get dist-upgrade first.