Remove Old Linux Kernel from Ubuntu Bootloader Menu

Remove Old Linux Kernel

Remove Old Linux Kernel

Do you use Ubuntu? If “Yes”, you are familiar with such GRUB bootloader menu items as:

GNU GRUB version 1.98-1 ubuntu 7
Ubuntu, with Linux 2.6.32.25-generic
Ubuntu, with Linux 2.6.32.25-generic (recovery mode)
Ubuntu, with Linux 2.6.32.24-generic
Ubuntu, with Linux 2.6.32.24-generic (recovery mode)

These additional menu items for older Linux kernels make available recover option in case of any accident with your current Linux kernel. It is right. We should to have at least 2 Linux kernels load options: current version and previous one. But with every Linux kernel update quant of such bootloader menu items grows. What to do with it? How to exclude unneeded Linux kernels from the bootloader menu? Yes, that’s possible and (don’t wonder) quite simple.

All recommendations you see here are tested with Ubuntu 10.04 LTS (the Lucid Lynx).
To exclude Linux old kernels from the boodloader menu – remove it with the help of Synaptic Package Manager (menu path: System->Administration->Synaptic Package Manager).

Synaptic package manager

Synaptic package manager


Make a quick search by “linux image 2.6.32 generic” search key, find unwanted old installed kernels in the opened list, mark for removing (context menu item “Mark for Removal”) and apply your changes with “Apply” button.
Removed kernel will dissappear from the bootloader menu automatically. Just reboot your system and you will get a new shorter bootloader menu.

Bonus. If don’t wish to see memory test menu items in your bootloader menu follow to this hint:
– go to the /etc/grub.d folder. Find 20_memtest86+ file there. Clear “executable” attribute for this file.
– Use sudo chmod -x '20_memtest86+' command for it.
– Reboot your system and get new bootloader menu without test memory options.

Tags: