When I tried to upgrade from Ubuntu 14.04 to 16.04, this is the message logs shown after sudo apt-get upgrade. Notice the last line, how do I forcefully update those 961 items?

          xserver-xorg-input-vmmouse-lts-vivid xserver-xorg-input-wacom-lts-vivid
          xserver-xorg-lts-vivid xserver-xorg-video-all-lts-vivid
          xserver-xorg-video-ati-lts-vivid xserver-xorg-video-cirrus-lts-vivid
          xserver-xorg-video-fbdev-lts-vivid xserver-xorg-video-intel-lts-vivid
          xserver-xorg-video-mach64-lts-vivid xserver-xorg-video-mga-lts-vivid
          xserver-xorg-video-neomagic-lts-vivid xserver-xorg-video-nouveau-lts-vivid
          xserver-xorg-video-openchrome-lts-vivid xserver-xorg-video-r128-lts-vivid
          xserver-xorg-video-radeon-lts-vivid xserver-xorg-video-savage-lts-vivid
          xserver-xorg-video-sisusb-lts-vivid xserver-xorg-video-tdfx-lts-vivid
          xserver-xorg-video-trident-lts-vivid xserver-xorg-video-vesa-lts-vivid
          xserver-xorg-video-vmware-lts-vivid yelp zeitgeist-core zenity zenity-common
        0 upgraded, 0 newly installed, 0 to remove and 961 not upgraded.
  • 2
    apt-get dist-upgrade – jordanm Aug 21 '16 at 18:19
  • 1
    @jordanm : This worked – InQusitive Aug 21 '16 at 18:23

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.