How to force installation of kernel updates when using apt-get upgrade?

To update my server I use apt-get upgrade.

But when there are kernel updates I always need to do apt-get install linux-.... because apt-get update does not install them.

Is there a way I can tell it to install those too? I tried -f but it does not work.


So, with regard to the comments: Sorry, you were right, I was completely mis-reading what apt-get was telling me (and I'm using the English version! :)).

After a little research, what you probably want to use is aptitude safe-upgrade, which does install new kernels. Really! I double checked! :)

You should probably prefer aptitude in general to apt-get anyway, unless you specifically need something in apt-get.

nknight@nkubuntu1004:~$ sudo aptitude safe-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Resolving dependencies...
Resolving dependencies...
The following NEW packages will be installed:
  linux-headers-2.6.32-24{a} linux-headers-2.6.32-24-generic{a} linux-image-2.6.32-24-generic{a} 
The following packages will be upgraded:
  apt apt-transport-https apt-utils base-files firefox firefox-branding firefox-gnome-support gdm google-chrome-stable 
  icedtea-6-jre-cacao linux-generic linux-headers-generic linux-image-generic linux-libc-dev openjdk-6-jre openjdk-6-jre-headless 
  openjdk-6-jre-lib software-center thunderbird ureadahead xulrunner-1.9.2 
21 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 129MB of archives. After unpacking 188MB will be used.
Do you want to continue? [Y/n/?] 

you're looking for

sudo apt-get dist-upgrade

if you want to install aptitude then please go ahead - but it has its dependencies and imho you can get away quite well without it - especially if you want to keep your server install lean(er).

When you run sudo apt-get upgrade it tells you about packages that weren't upgraded in the following way:

The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic

So, if you are connected using an ssh terminal, it's just a matter of copy+paste to enter the following command:

$ sudo apt-get upgrade linux-generic linux-headers-generic linux-image-generic

which upgrades just the packages that were kept back. Use uname -r to display the kernel version before and after the reboot (necessary to refresh the running kernel) and don't forget to run purge-old-kernels after the reboot.