Is dist-upgrade safe?

Does anyone know if the use of apt-get dist-upgrade is safe to use on a new installation of Ubuntu 16.04? I noticed on the welcome screen it says we should only do upgrades by a fresh install. I saw this after I already gave the command, of course. Does anyone have any details on that warning message? Should I image a new install?

Hi @moonchips,

yes!, it is safe to use, my fav comand is the following with which I have never had any Problems!:

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

To force any missing missing dependencies, I also use the following:

sudo apt-get update && sudo apt-get dist-upgrade -f

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.

So, what does this mean for an average user with a typical system? The answer is nothing. You can use all of the above with confidence. The only time that apt-get dist-upgrade (in rare circumstances) might cause a problem is if you have a specialized setup with non-typical programs running on your system. I have just such a system. But, as of yet, apt-get dist-upgrade has never caused me a problem, as it happens.

4 Likes

Open a terminal and enter:

man apt-get
1 Like

… and because everyone can save a few keystrokes, I like to point out that you can also use the new(ish) frontend command apt. It also turns on some extras by default like colo(u)rs and a progress bar.

The equivalent commands are:

apt update
apt upgrade
apt full-upgrade
(apt dist-upgrade does also work)

Run man apt for more details.

3 Likes

Thanks for the help everyone :slight_smile:

2 Likes