To update your Ubuntu system, you can first run this command:
sudo apt-get update
This command will resynchronize the package files from their sources. Basically, this command gives you a list of available packages and their locations.
Next, you can perform either of the two commands below:
sudo apt-get upgrade
sudo apt-get dist-upgrade
To determine which one to use, stability is the main factor to consider. The upgrade
command will only install the newest versions of all packages currently installed on your system, meaning that this command WILL NOT remove currently installed packages, or install packages that aren't already retreived and installed. This is the more stable of the two options. The dist-upgrade
command is more agressive, in that it has a built in means of dealing with changing dependencies: in other words, this option has the ability to remove packages. While this means that there is a much higher potential of breaking something, this command won't keep any packages back like the regular upgrade command. In a sense, this makes dist-upgrade
a more "complete" way of upgrading your packages, though not without its risks.