Editing grub menu item

(Eliud) #1

How do I edit and remove some of the linux headers on my grub ? There are too many items on it.

1 Like
(Amzker Pro Hacker) #2

Common way,
Delete all files related to each other or
Give it to apt

Best way Googling

1 Like
#4

You don’t want to edit the grub menu, the package manager will select obsolete kernels to remove when you update. If you’re trying to get rid of old kernels it’s handled by the package manager just like every other package. Don’t touch the menu and don’t just go into /usr/src and start deleting things.

3 Likes
(Eliud) #5

The package manager hasn’t done that, I am doing a dual boot with windows but the menu at boot where i have to select the OS gives me like 4 entries of Parrot. this makes it untidy and also confusing. I have tried upgrading to see whether this can change but not yet

(dmknght) #6

sudo apt remove linux-header-<version> and sudo apt remove linux-image-<version> to remove old kernel version.

1 Like
#7

Oh those yes, do yourself a favor and bear with it and not get rid of those.
You have perhaps an old kernel, youll want that if after a system modification to the current one the machine stops booting. There is almost certainly a line for rescue mode, youll have to boot to the rescue console I already to recover the system. You may also have a line about Nvidia nouveau nomodeset that would may or may not be particularly useful to you depending on whether or not you’ve got that kind of graphics card or have that kind of a graphics problem… but it may bottom line is what I’m trying to say is it those lines are there to give you extra options that you would otherwise have to type in manually in the grub menu if you needed them. Trust me when you need them it’s a lot more convenient.
But if you really want to remove it the grub menu is made by “grubcfg” in the boot partition…and if you dual boot windows you’ll want a copy of that file 'cuz windows is going to override that boot menu at some point. Its inevitable.

1 Like
(Eliud) #8

Thank you for this info @muroga I’m kinda new on Linux. Still finding my way around but liking it