Each version of the kernel can occupy up to 150 MB. If you have downloaded the headers you get 250 MB of space.
To view the installed kernels
dpkg --list | grep linux-image
Lists the headers installed
ls /usr/src | grep 'linux-headers'
First remove the headers using somethings like this
sudo apt-get purge linux-headers-3.8.0-19
then remove any specific kernel that is no longer needed
sudo apt-get purge linux-image-3.8.0-19-generic
Command list for cleaning and repairing
#houseclean sudo apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete)
#refresh sudo apt-get update #resync package index #would upgrade you to the latest kernel in the repositories sudo apt-get dist-upgrade # fix Broken packages -f sudo apt-get -f install # Remove lock sudo rm /var/lib/dpkg/lock # added zika's tip for problems with hash sum mismatch sudo rm /var/lib/apt/lists/* |