http://askubuntu.com/questions/289869/ubuntu-12-10-i-cant-clean-up-space-in-boot-directory
It's probably because you have too many kernel packages installed (you can only run one at a time).
Check which kernel packages are installed:
dpkg -l 'linux-image*' | grep '^ii'
Check what your current kernel is:
uname -r
% ls -al /boot
And my currently running kernel is:
% uname -r
3.5.0-27-generic
Thus, in my case I could free up space in /boot by removing:
linux-image-3.5.0-26-generic
linux-image-3.5.0-28-generic
by running apt-get remove <package_name>
|
You can remove ALL the old kernels, and keep just the latest one. This will free up space on /boot . This is doable via multiple methods.
Refer this link. User mikewhatever has provided an answer which can do this removal from one single command from command line.
Update: listing the command here itself, from the said link:
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
|