Un-cluttering Grub2 on Ubuntu
Sick of all your different kernel versions showing up on your boot menu? Just want your latest one to show up, but don’t want to deal with removing old kernels every time you update? It’s easy!
Open up /etc/grub.d/10_linux in your favorite editor. Scroll down to the while loop at the end of the script and replace the while… do… done statements with if… then… fi. Save the script, run update-grub and you’re done! Your boot menu should now show only the latest kernel for your Ubuntu install. I’m guessing this will work for just about any distro that uses Grub2, although I’ve only tested it on Ubuntu.
Offline