Ubuntu: How to delete old kernels to free up space in the boot partition
January 15, 2015 Comments
This is at least the second time this has happened to me so I figured I'd make a note here for future reference.
Basically I was running the Software Update and it complained that there is "Not enough free disk space":
The upgrade needs a total of 81.7 M free space on disk '/boot'. Please free at least an additional 15.5 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
The fix is to simply delete other kernels you're not using. You'd normally want to keep the most recent previous version as well.
To get the version you're currently using:
uname -r
Now list all the versions installed on you machine:
dpkg -l | grep linux-image-
Delete the kernels you're not using, for example:
sudo apt-get autoremove linux-image-3.13.0-36-generic linux-image-3.13.0-37-generic