Ubuntu: Removing Kernels from grub



Question:

My grub has the following versions which I want to remove.

  • Ubuntu, with Linux 4.1.0-rc5-next-20150529
  • Ubuntu, with Linux 4.1.0-rc5-next-20150529.old
  • Ubuntu, with Linux 4.1.0-rc4-next-20150525
  • Ubuntu, with Linux 4.0.0-rc6-next-20150402+
  • Ubuntu, with Linux 4.0.0-rc6-next-20150402+.old

I tried the following methods to remove:

Using Synaptic tool and I have typed the following commands:

uname -r      dpkg --list | grep linux-image       sudo apt-get purge linux-image-x.x.x.x-xyz    sudo update-grub2  

Both of the methods failed to remove the kernel versions.


Solution:1

If your kernel images and headers had been installed from deb packages, not from repositories, you can remove them by

sudo dpkg -r linux-image-x.x.x.x-xyz linux-headers-x.x.x.x-xyz  

But using synaptic is much easier. you will see what are you doing in GUI.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »