Ubuntu – How to use apt-get to update to the latest kernel


My current kernel is 3.2.0-26 (my main computer) while on another of my Ubuntu computers, with which I didn't fiddle with unofficial updates, it's 3.2.0-30. Yet the Update manager on my main computer doesn't show available kernel updates. It shows other updates though.

I suspect is due to the fact that in the past I installed multiple mainline kernel versions (not recommended versions), up to 3.5* series.

What I'm after:
Either: Fix automatic kernel updates.
Or: Learn about a way to check for the latest official ubuntu kernel version and get it manually (I know how to install kernels from debs)

What I have already tried:
Uninstalled unused kernels including "the generic one without a number" as per https://askubuntu.com/a/103875/29347 and then also https://ubuntugenius.wordpress.com/2011/01/08/ubuntu-cleanup-how-to-remove-all-unused-linux-kernel-headers-images-and-modules/

Best Answer

Your problem with automatic updates may be because of the mainline kernels or because you removed the "generic" package.

You can update to the latest kernel via apt-get as follows:

sudo apt-get update
sudo apt-get install linux-image-`uname -r`

If you also need the headers (to compile kernel modules such as wireless drivers):

sudo apt-get install linux-headers-`uname -r`