Ubuntu 18.04 LTS Bionic and newer Ubuntu versions … provide a streamlined syntax via apt full-upgrade
which functions like apt-get dist-upgrade
.
sudo apt full-upgrade
sudo apt upgrade
is used to install available upgrades of all packages currently installed on the system from the sources configured via sources.list(5). New packages will be installed if required to satisfy dependencies, but existing packages will never be removed. If an upgrade for a package requires the remove of an installed package the upgrade for this package isn't performed.
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.
Note: sudo apt full-upgrade
remains on the current distribution.