Properly Cleaning Up /boot Partition

This is a follow-up post to a post I made earlier today: Cleaning Up /boot Partition.

I won’t say that the steps in that post aren’t going to help clear up space, but it certainly didn’t do the trick for me. I still had a piled up /boot partition loaded with the kernel images. I can’t explain why, but completely removing them via Synaptic apparently didn’t completely remove them. So, it appears this method is more effective.

Search for installed packages named linux-image* to see the kernels on the machine:

dpkg -l linux-image*

Like before, you can find the current kernel using this command:

uname -r

I recommend keeping the current and its previous kernel, but that choice is yours. Either way, you do not want to remove the current kernel! Using the same example from the previous post, I’ll change the step to remove the same kernel images but using this method.

sudo apt-get remove linux-image-{34,35,36,37,39,40,43,44}-generic

Then, remove dependencies.

sudo apt-get autoremove