I have. a simple question. After I updated my kernel, I couldn't boot (stuck on purple screen) unless I chose the old kernel. So how do I delete the new kernel with synaptic. And how do I do this safely? I'm in Quantal Quetzel. My kernel is 3.5.0-40. The working kernel is 3.5.0-39. Also, how do I stop kernel updates from appearing in the update manager? Thanks.

  • what is the version of the Kernel? you want to remove? – mojo706 Sep 8 '13 at 20:41
  • My kernel is 3.5.0-40 – Dave Sep 8 '13 at 20:52
  • 1
    If you'd prefer answers to include information about preventing the new kernel from being installed again with your other updates, you might want to include that in your question. – Eliah Kagan Sep 9 '13 at 0:25
  • I think it is not wise to delete the kernel or to stop kernel updates, as they are usually security updates. See this question about a better practice. – jarno Dec 27 '15 at 15:08
up vote 25 down vote accepted

To safely remove the unwanted kernel, open a terminal session and run the command:

Find the kernel package name

dpkg -l | grep 3.5.0-40

On amd64/x86_64 it is linux-image-3.5.0-40-generic.

Remove (purge - remove all configuration files as well)

sudo apt-get purge linux-image-3.5.0-40-generic

  • Oh don't I need to do sudo update-grub after that? – Dave Sep 8 '13 at 21:15
  • The postrm script of the package will update grub for you when you remove (purge) it;-) – Terry Wang Sep 8 '13 at 21:18
  • Thanks Terry that fixed my problem. Now how do I keep kernel updates out of the update manager? – Dave Sep 9 '13 at 13:26
  • sudo apt-get update && apt-get dist-upgrade -y, not sure if you have linux-current-generic or linux-image-generic-lts-raring on non-LTS releases. – Terry Wang Sep 9 '13 at 13:34
sudo apt-get remove linux-image-3.5.0-40*.

I will suggest you always keep at least one older kernel available, just in case you need to boot into it for reasons you may never expect right now.

  • Ik that about keeping the kernels. Very important stuff. I have one other besides this one. Ty I'll try it tomorrow and post back. – Dave Sep 8 '13 at 21:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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