After yesterday's update of Linux Mint Mate (64bit), I started to receive a warning about "Full disk space". I have 400 MB for the /boot partition on my hard disk.

This is the screen-shot of the /boot files.

screenshot1

This is the screen-shot of the update-log.

acreenshot2

The question is: How can I clean the /boot? What files are safe to delete?

  • Sorry, I don't have enough reputation to post images. – matiasmasca Nov 11 '16 at 14:24
  • 1
    You have 4 bootable installations (4.4.0-31, -34, -36 and -38). You are unlikely ever to need more than one previous boot, so uninstall and completely remove all the -31 and -34 files (I find synaptic easiest), and you will halve the size of /boot. – AFH Nov 11 '16 at 14:31
up vote 6 down vote accepted

I received this response from StackOverflow before they flag my question...

Check the current kernel version with uname -r and make sur that the current kernel work without any problem to keep it.

From the terminal:

List the installed kernel :

dpkg --list | grep linux-image
dpkg --list | grep linux-headers

Remove the old kernels through the following command:

apt-get purge linux-image-x...
apt-get purge linux-headers-x...

using the synaptic package manager

Open Synaptic and mark the old kernel versions for removal then apply changes

Update Manager

from the Update Manager view the Linux kernels , click the 'Remove' button for the kernels that you want to remove

Purge-old-kernels

You can install the purge-old-kernels cli tool through:

sudo apt-get install bikeshed

If you want to purge the old kernel except for the latest 2 kernels, run the following command:

sudo purge-old-kernels --keep 2

Finally run

sudo update-grub 
sudo update-grub2

Get the current of list of installed kernel packages:

dpkg -l linux-* | awk '/^ii/{ print $2 }' | grep -e [0-9]

View current kernel version:

uname -r

Take away the old versions of packages that are older than the current kernel by specifying them separated by a space in command:

sudo apt-get purge

  • I got this:linux-base linux-firmware linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-34 linux-headers-4.4.0-34-generic linux-headers-4.4.0-36 linux-headers-4.4.0-36-generic linux-headers-4.4.0-38 linux-headers-4.4.0-38-generic linux-headers-4.4.0-42 linux-headers-4.4.0-42-generic linux-headers-4.4.0-43 linux-headers-4.4.0-43-generic linux-headers-4.4.0-45 linux-headers-4.4.0-45-generic linux-headers-4.4.0-47 linux-headers-4.4.0-47-generic ... – matiasmasca Nov 11 '16 at 14:44
  • Wow... You have too many kernels! Remove all packages that has version and it different from uname -r result – Slipeer Nov 11 '16 at 14:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.