linux upgrade notes

Register or login to post to the forum.
11 Apr, 2016 16:58

Notes on upgrading and patching an Ubuntu server

11 Apr, 2016 17:10

APT-GET notes

apt-get upgrade - upgrade existing packages apt-get dist-upgrade - upgrade existing packages and add/remove dependencies apt-get install x - install "x" where x is a program like "htop" apt-get purge x - like install but full removal

Packages held back. Why?

How to get rid of the "5 packages held back" message after an upgrade. Use apt-get dist-upgrade. More detail below.

The difference between apt-get upgrade and apt-get dist-upgrade

apt-get upgrade

apt-get upgrade is restricted to the case where packages are to be replaced by newer versions, but no package needs to be added or removed. A new version of Firefox, for instance, should be installable with apt-get upgrade.

apt-get dist-upgrade

However apt-get upgrade will refuse to work when there are additions or removals required by the updated versions. For example, when you have kernel linux-image-3.2.0-10-generic installed and linux-image-3.2.0-11-generic appears, the linux-image-generic package gets updated to depend on the newer version. In order to install the new kernel, you need to run apt-get dist-upgrade.

Notice how an apt-get upgrade will say that the kernel packages have been held back. That's the cue for using apt-get dist-upgrade.

Source: From this article on askubuntu by user pablomme

Edited 11 Apr, 2016 17:13