How do I upgrade everything on Ubuntu

apt-get upgrade plays it safe: it upgrades all the packages that can be upgraded without breaking other packages. If upgrading package A requires uninstalling package B, apt-get upgrade won't do it, and A ends up in the “not upgraded” list.

Over time, packages get broken into pieces, joined together, renamed, etc. In addition to basic dependencies (A requires B), a package C can declare that it “replaces” a package B, indicating that when C is installed, it should be ok to uninstall B. Apt also has a concept of automatically-installed vs manually-installed package; it should be ok to remove an automatically-installed package even if it isn't explicitly getting replaced, whereas manually-installed packages are requested by the user and should stay. But apt-get upgrade doesn't take any risk.

There is another command apt-get dist-upgrade which is willing to remove packages if necessary. The idea is that apt-get upgrade only upgrades individual packages, whereas apt-get dist-upgrade upgrades the whole distribution. apt-get upgrade is low-risk and you can pretty much do it without paying attention, whereas apt-get dist-upgrade might occasionally remove a program that you rely on, especially if you haven't taken care to mark all the packages you absolutely need as manually installed. You're unlikely to end up with a broken system after apt-get dist-upgrade, but sometimes you might need to reinstall a package or two.

Aptitude has the same command duality, but has introduced prefered synonyms:
safe-upgrade=upgrade   vs.   full-upgrade=dist-upgrade.

In addition, Ubuntu provides a program called do-release-upgrade which is the recommended way to upgrade from one Ubuntu release to the next (or from one Ubuntu LTS to the next). This program runs apt-get dist-upgrade under the hood, but makes some checks and preparations first and performs some cleanup afterwards.

In summary:

  • If upgrading between Ubuntu releases, use do-release-upgrade.
  • If you're just installing security updates and bug fixes, use apt-get update followed by apt-get upgrade (or aptitude safe-upgrade).
  • Otherwise use apt-get update followed by apt-get dist-upgrade (or aptitude full-upgrade).

You did not say how you got there. But the first thing to do would be to check how to upgrade. Advice is easy to find, e.g., How To Upgrade to Ubuntu 16.04 LTS from Ubuntu 14.04 LTS, which comes to the point by saying to run

sudo update-manager -d

Tags:

Ubuntu

Apt