While performing some regular maintenance on one of my Ubuntu machines I was getting a bit confused between all of the upgrade commands, so I investigated further. I’ve listed below the basic differences between each:
sudo apt-get upgrade
install newest versions of packages on machine
sudo apt-get dist-upgrade
upgrades all packages on system, handle dependency changes (remove obsolete packages). This command prepares the system for upgrade but since /etc/sources.list is not changed to the sources for the newer distribution it will not actually upgrade to the newest version.
To actually perform a distribution upgrade the following command should be used (ensure you have a backup before issuing this command. The upgrade could make your system unstable):
First, check which version you are currently running using the following:
lsb_release -a
Next, you can download the newest update manager and issue the upgrade command:
sudo apt-get install update-manager-core sudo do-release-upgrade
All of these commands should be used with caution as you are directly affecting your software packages installed on the system.
This site was very helpful in my initial investigation of the differences of this command.