Should I upgrade my kernel?

July 17, 2016 920 views
Linux Commands DigitalOcean Ubuntu

"apt upgrade" wants to upgrade 2 packages and install 4 extra packages (the 4.4.0-31 kernel). "apt-get upgrade" tells me the same 2 packages are held back. (linux-headers-generic-lts-xenial and linux-image-generic-ltx-xenial)

The control panel on the website says "The kernel for this Droplet is managed internally and cannot be changed from the control panel."

I don't know the inner workings of a VPS. Should I upgrade the kernel using apt, or will this break my droplet? For that matter, how are kernel updates managed on Digital Ocean?

2 Answers
MDS July 17, 2016
Accepted Answer

Some kernels can be managed using DO's control panel, and some Linux distros such as Ubuntu 16.04 (at the moment) does not support kernel updates via the control panel.

You can upgrade the kernel by following the command:

sudo apt-get update
sudo apt-get dist-upgrade

And then reboot the server

sudo reboot

Updating the kernel should not cause any issues but I will recommend taking a snapshot of the Droplet before updating it.

  • The dist-upgrade command will also upgrade my droplet from 14.04 to 16.04, but thanks for the info.

    • If you are just updating the kernel then you can search for the kernel package by running the command below. This will list all available linux image versions.

      sudo apt-get update
      apt-cache search linux-image

      Then install the kernel by running the command below. Replace linux-image-4.4.0-31-generic with the version you want to install.

      sudo apt-get linux-image-4.4.0-31-generic

      Now reboot your server.

       sudo reboot

      Additionally sudo apt-get dist-upgrade will not upgrade your Ubuntu version, it will install available updates for current version of Ubuntu. However it can remove packages you have installed on the server. To upgrade the Ubuntu version, you need to use do-release-upgrade.

apt-cache search linux-image it lists all available linux image versions

Have another answer? Share your knowledge.