I just learned this. I have seen this asked a lot.
You might can do this with kpackagekit, but I suggest using synaptic. If you don't have synaptic you can install it.
If you want to remove the old kernels. Type linux-headers in the search field of synaptic and scroll through and mark for complete removal the old kernels. Then type update-grub2 as root. That's it.
Here is the link where I found this.
http://ubuntuforums.org/showthread.php?t=1195275
You might can do this with kpackagekit, but I suggest using synaptic. If you don't have synaptic you can install it.
If you want to remove the old kernels. Type linux-headers in the search field of synaptic and scroll through and mark for complete removal the old kernels. Then type update-grub2 as root. That's it.
Here is the link where I found this.
http://ubuntuforums.org/showthread.php?t=1195275
# Too Many Kernels? Kernels removed via Synaptic or with "apt-get remove" will automatically update grub.cfg and no user action is required.
* In Synaptic, type the kernel number in the search window at the upper right (for example - 2.6.28-11).
* Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
* Right click and select "Mark for Complete Removal" and then press the Apply main menu button.
* The kernels will be removed from your system and from the Grub menu.
* If you are not sure of the kernel you are currently using, in a terminal type "uname -r".
* Many users keep one previous kernel on the machine which previously ran without problems.
* In Synaptic, type the kernel number in the search window at the upper right (for example - 2.6.28-11).
* Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
* Right click and select "Mark for Complete Removal" and then press the Apply main menu button.
* The kernels will be removed from your system and from the Grub menu.
* If you are not sure of the kernel you are currently using, in a terminal type "uname -r".
* Many users keep one previous kernel on the machine which previously ran without problems.
Comment