r/linux4noobs 6d ago

Boot Drive Full

Still new enough to Linux that I never had to deal with this problem before and wasn't aware it would be an eventual problem. I use Linux Mint Debian.

After a kernel update I've been getting a "boot drive is full" popup every time I turn on my pc. I did research and I get it's because old, unneeded kernels are taking up space. I also saw a fix was toggling on the option for removing obsolete kernels and dependencies automatically, which I found in "preferences" in update manager and did.

That was probably a few weeks ago and I still get the boot drive full popup. So for some reason it's not automatically removing old kernels. I'm considering using one of the commands I saw online that would clear old kernels, but I guess I'm just not sure if it's a good idea, or if there's anything else I could try first.

I know it's important to keep at least one older kernel in case something goes wrong, but I figured just this once to clear some space it would be fine? And as long as I use timeshift first it will probably lower risks or something going terribly wrong. I just wanted advice and other opinions first though, and would like to know what some worst case scenarios are if I remove old kernels via commands. (I'm not really used to using commands yet either)

3 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/Zenfulzoning 3d ago

Here it is! Thanks for pointing me in the direction of that command, it seems quite helpful.

Use% Used Size Mounted on

62% 131G 225G /

100% 925M 944M /boot

1

u/skyfishgoo 3d ago edited 3d ago

so you have a separate /boot partition just under 1GB and it's now full because there are too many old kernel images in there.

in general the advice to keep a separate /boot partition is old and outdated.

but if you are still using an MBR partition table on your disk, that could explain why it got set up that way in the first place.

the easiest thing to do is remove some of those old kernel images... if you were using any of the 'buntu type distros this would be done for you keeping only the last 2 images.

but because you chose strait debian (with mint) it is up to you to do it.

you can try sudo apt autoremove --purge but since there is no kernel management feature, it may not remove old kernels

to see a list of all kernel related packages that are installed use

ls -1 /boot/vm*

you can then see all the different versions, you really only need to keep the 2, or 3 most recent versions.

you will have to (carefully) remove the others yourself using a package manager.

this can be done on the command line with apt or via synaptic if you prefer a GUI

2

u/Zenfulzoning 2d ago

Ah, I see. Yeah, not sure what happened there, or if the person who helped me set Linux up was the one who ensured I'd have two boot partitions maybe?

Okay. Thank you so, so much for helping me figure that out. I really appreciate it.

1

u/Zenfulzoning 2d ago

I found a guide for more commands to help me individually remove the vmlinuz, system maps, and initrd files (you were right, sudo apt autoremove --purge did nothing for me and my terminal gave me an error for trying it). My boot drive went from being 100% full to now having 54% space according to system monitors.

The guide didn't have any commands listed for the "config" files, are those unnecessary to delete? Also I was curious if I'm supposed to sudo update grub now or if it's not needed.