[SOLVED] are these files necessary in /boot?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
gammill

[SOLVED] are these files necessary in /boot?

Post by gammill »

After an install of a new kernel these files were created in /boot
initrd.img-4.10.0-38-generic
initrd.img-4.13.0-45-generic
initrd.img-4.15.0-29-generic
initrd.img-4.15.0-30-generic
initrd.img-4.15.0-32-generic
initrd.img-4.15.0-33-generic
initrd.img-4.15.0-34-generic
initrd.img-4.15.0-36-generic
initrd.img-4.15.0-38-generic
initrd.img-4.15.0-39-generic
initrd.img-4.15.0-42-generic
May I rm them without concern?
I am running kernel 4.15.0-42
(I'm new with Mint so forgive me if I'm not spot on with terminology.)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: are these files necerray in /boot?

Post by smurphos »

Don't remove them manually.

Does apt autoremove --purge list any old kernels for automatic removal? If so go ahead and allow the command to remove them.

If not use Update Manager > View > Linux Kernels to remove some of the older kernels manually.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
gm10

Re: are these files necerray in /boot?

Post by gm10 »

smurphos wrote: Mon Dec 10, 2018 3:44 am If not use Update Manager > View > Linux Kernels to remove some of the older kernels manually.
Aw, do I still get to post my script? :lol:

Automatic cleanup of all old kernels, copy & paste into a terminal window:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^gl]*'|sort -u|sed -e "/^$/d;s/\~[^~]*$//;s/\.[^.]*$//;/$(uname -r|sed 's/-generic\|-lowlatency//')/d;s/.*/linux-*-&*/"|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
Last edited by gm10 on Fri Dec 21, 2018 4:23 pm, edited 1 time in total.
gammill

Re: are these files necerray in /boot?

Post by gammill »

gm10 wrote: Mon Dec 10, 2018 5:53 am
smurphos wrote: Mon Dec 10, 2018 3:44 am If not use Update Manager > View > Linux Kernels to remove some of the older kernels manually.
Aw, do I still get to post my script? :lol:
Thank you... I will have to study that script. It ran on for a long time, and in the end may /boot directory had been
purged and was clean. Very good!
gm10

Re: are these files necerray in /boot?

Post by gm10 »

Happy to help. In Mint 19.1 you can also now do a kernel mass removal via Update Manager by the way.
Locked

Return to “Installation & Boot”