4

I have ubuntu 16.04;

Installed kernel linux-image-4.13.0-31 update, but I didn't like it, so I decided I want to keep using 4.13.0-26 for now. How can I prevent the update from affecting the kernel version?

  • No need, simply use GRUB to boot into -26. The script that marks older kernels as eligible for autoremoval won't mark the currently-running kernel (for obvious reasons). – user535733 Jan 25 '18 at 1:01
  • 1
    If you do stop at -26 note kernels will keep getting installed. FYI I have 8 GB in kernels I've manually installed. Each kernel is about 400 MB: askubuntu.com/questions/892076/… – WinEunuuchs2Unix Jan 25 '18 at 1:08
0

To prevent the kernel from getting purged by sudo apt autoremove, pin the kernel using:

sudo apt-mark hold linux-image-4.13.0-26-generic linux-headers-4.13.0-26-generic

If you boot with version -26 and run autoremove without pinning the kernel first, it still won't be removed because you booted with it. If you boot with the newest kernel version and run autoremove then -26 will be purged if it's not the most recent or the next most recent version installed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.