...
Code Block | ||
---|---|---|
| ||
sudo apt-get upgrade --simulate |
dist-upgrade
The next level is,
...
language | bash |
---|
...
You may notice with apt-get upgrade that even though there are some updates not yet installed, they get "kept back". That is because these are considered more intrusive updates and will only be installed through a dist-upgrade.
This type of upgrade often updates the Linux headers. A the Linux kernel in which case reboot is sometimes required to change to the new kernel.
From the man pages,
Panel |
---|
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. So, dist-upgrade command may remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages. |
There are some additional considerations when performing a dist-upgrade when a kernel upgrade is on the list,
- Have console access - in some rare cases, on boot-up you will want to choose to go back to your previous kernel.
- Be prepared to reboot - for the kernel to take effect you will need to reboot your machine.
Check to see if kernel upgrade is available,
Code Block | ||||
---|---|---|---|---|
| ||||
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-image-virtual linux-virtual
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. |
Notice line 5 indicates that kernel upgrade is required because of the keyword image.
Optionally, record the current kernel information. For example,
Code Block | ||
---|---|---|
| ||
uname -a
Linux tinh0v00app 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux
sudo cat /proc/version_signature
Ubuntu 2.6.32-33.72-server 2.6.32.41+drm33.18 |
Run the upgrade,
Code Block | ||
---|---|---|
| ||
sudo apt-get dist-upgrade |
Verify that a reboot is required by checking for the reboot-required file. If the file does not exist you will not need to reboot.
Code Block | ||
---|---|---|
| ||
cat /var/run/reboot-required
*** System restart required *** |
If all goes well you will get back in. If not, get console access, reboot the system and select the previous kernel during the initial boot.
Optionally, verify the new kernel is running. For example,
Code Block | ||
---|---|---|
| ||
uname -a
Linux tinh0v00app 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux
sudo cat /proc/version_signature
Ubuntu 2.6.32-33.72-server 2.6.32.41+drm33.18 |
do-release-update
Release updates are the most disruptive. The almost always require a reboot. The process is quite involved and it is recommended to turn off all services.