26

Before Ubuntu 18.04 was available, I was using Ubuntu 16.04. And I was using sudo apt-get update, sudo apt-get upgrade and sudo apt-get dist-upgrade to do the update and upgrade stuff. With Ubuntu 18.04, I changed to to use apt instead of apt-get. What was weird for me is that sudo apt dist-upgrade has no effect anymore: I do the update and upgrade using sudo apt update and sudo apt upgade, but when I run sudo apt dist-upgrade, nothing happens contrary to when I was using sudo apt-get dist-upgrade.
When I used sudo apt-get dist-upgrade some packages were removed and others were installed. However when I run sudo apt dist-upgrade, nothing happened at all.. All what I get is:

sudo apt dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  

And this happens every time since I started using apt instead of apt-get.
Is it something related to apt (i.e sudo apt upgrade replaces both upgrade and dist-upgrade) or what is the issue exactly?

singrium
  • 7,320

2 Answers2

38

apt-get upgrade vs apt upgrade vs apt full-upgrade

apt-get upgrade only upgrades the apps, tools, and utilities. It does not install new Linux kernel of the OS.

apt upgrade upgrades the apps, tools, and utilities and installs new Linux kernel of the OS. However, it never removes old packages.

apt full-upgrade upgrades the apps, tools, and utilities and installs new Linux kernel of the OS. It also removes old packages if needed for the upgrade.

It looks to me apt full-upgrade does the same thing as apt-get dist-upgrade. That is to say the full-upgrade will check for and install a new kernel if available and removes old packages if the removal is necessary for the upgrade.

kernels are the fundamental part of the OS. For this reason the the old version of the kernel is never replaced by the new version when you run apt upgrade or apt full-upgrade. The new version of kernel is installed and the existing version is kept as is. The configuration in the grub is changed to boot from the new version by default during the upgrade process. If the new kernel does not work for some reason one can boot from the old kernel from the advanced grub menu.

Note, apt full-upgrade does not remove older versions of kernels as it installs the newest version. To remove these one must use apt autoremove.

Why change the name from dist-upgrade to full-upgrade?

  • If you use apt-get then you need to use dist-upgrade
  • If you use apt then you need to use full-upgrade

I think the dist-upgrade was a bit confusing. For example, this does not upgrade from Ubuntu 16.04 to Ubuntu 18.04. It only upgrade the kernel, and other stuff, within Ubuntu 16.04.

I think full-upgrade is more intuitive than dist-upgrade.

See What is "dist-upgrade" and why does it upgrade more than "upgrade"? for more details.

Full disclosure: I am just an user of Ubuntu I didn't make the decision to change it. These are my personal views.

Hope this helps

user68186
  • 37,461
16

dist-upgrade has been superseded in Ubuntu by full-upgrade.

Older users of Ubuntu remember when dist-upgrade was indeed used regularly to install kernel packages. Kernel package names change with the version, making them ineligible for normal upgrade. full-upgrade was added to safely meet this need of the Ubuntu package flow.

The original purpose of dist-upgrade is to migrate between releases of Debian (roughly equivalent to Ubuntu's do-release-upgrade.) So there is a bit less protection from unanticipated consequences. Read the proposed changes carefully before agreeing.

Using dist-upgrade instead of full-upgrade probably won't hurt a healthy system. Millions of users over a decade have worked a lot of the bugs out of the apt workflow. However, dist-upgrade may have unexpected results on a system with held broken packages or other unresolved problems.

user535733
  • 68,493