Apt-get upgrade vs apt-get dist-upgrade

I was reading an article the other day about a new program for Ubuntu. When they talked about installing they said to do the following after adding the PPA

sudo apt-get update
sudo apt-get dist-upgrade

Now, my question is twofold. What is the difference between apt-get upgrade and apt-get dist-upgrade? Also, which sould I use when updating Ubuntu MATE from terminal?

1 Like

apt-get update updates the list of available packages and their versions, but it does not install or upgrade any packages.

apt-get upgrade actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to update.

apt-get dist-upgrade, in addition to performing the function of apt-get upgrade, also intelligently handles changing dependencies with new versions of packages and will attempt to upgrade the most important packages at the expense of less important ones if necessary. Thus, the apt-get dist-upgrade command may actually remove some packages in rare but necessary instances.


Often wondered this myself. Good explanation.

As of about a year ago¹, you can also use the apt front-end, which has nicer output.

The equivalent commands are apt update, apt upgrade and apt full-upgrade.

1: https://mvogt.wordpress.com/2014/04/04/apt-1-0/


And the command:

sudo apt-get dist-upgrade -f

will force any missing dependencies should there be any stragglers!. :smiley:

1 Like

To sudo “apt-get upgrade” and “apt-get dist-upgrade”. Can they discard levels not selected to Linux Mint??
Example: 1, 2, 3 Levels, and discards to levels 4 and 5.

I don’t believe that the apt or apt-get commands obey any part of the Mint notion of levels or priorities. That is why I usually use the command line to update my Linux Mint Debian Edition boxes.

And to keep it relevant to the forum, I also use apt / apt-get on the Ubuntu MATE box too. :slight_smile: