Linux – Clean /boot on Ubuntu

linuxUbuntuubuntu-12.04

When I boot my Ubuntu server, I have this warning message:

 => /boot is using 100.0% of 235MB

And when I look into /boot, I have a lot of files which are dependent of the version of the kernel.

ls -al /boot/
abi-3.13.0-*-generic
config-3.13.0-*-generic
initrd.img-3.13.0-*-generic
System.map-3.13.0-*-generic
vmlinuz-3.13.0-*-generic

Where the * correspond to 24,35,36,37,39,40,41,43,44

How can I clean this securely ?

thanks

Best Answer

Uninstall the old kernel versions that you're not using any more. I normally keep the last two or three versions installed, and remove the older ones. So for example you can run

apt-get purge linux-image-3.13.0-{24,35,36,37,39,40}-generic

When you do that, the old files that you listed above will be removed from /boot.

Related Topic