I'm running Kubuntu 14.04 on my private laptop. When the package system updates my Linux kernel it removes the old packages, only keeping the 2 newest versions of the kernel images (and associated packages). At the moment that would be (AFAIR) 3.13.0-32 and 3.13.0-48. How do I get the package system to stop removing the old kernel images?
I realize this will leave me with a long list of not used kernel images, but I would rather have to do the clean up myself, than risk ending up in a situation where I can't boot my laptop.
EDIT: Based on the answer from Aaron Digulla I created a file, /etc/apt/apt.conf.d/99keep-kernels, with this content:
APT::NeverAutoRemove
{
"^linux-image-*-generic$";
"^linux-image-*-generic$";
"^linux-headers-*-generic$";
"^linux-headers-*-generic$";
"^linux-image-extra-*-generic$";
"^linux-image-extra-*-generic$";
"^linux-signed-image-*-generic$";
"^linux-signed-image-*-generic$";
"^kfreebsd-image-*-generic$";
"^kfreebsd-image-*-generic$";
"^kfreebsd-headers-*-generic$";
"^kfreebsd-headers-*-generic$";
"^gnumach-image-*-generic$";
"^gnumach-image-*-generic$";
"^.*-modules-*-generic$";
"^.*-modules-*-generic$";
"^.*-kernel-*-generic$";
"^.*-kernel-*-generic$";
"^linux-backports-modules-.*-generic$";
"^linux-backports-modules-.*-generic$";
"^linux-tools-*-generic$";
"^linux-tools-*-generic$";
};
But that didn't work. Ubuntu still only keeps the 2 latest kernels.