** DISCLAIMER **
Do this at your own risk
BACK UP!
Find out how much disk space is left.
sudo du -h /boot –max-depth=0
Reboot before you use this command to insure the system knows what the most current kernal is.
This will remove old kernels. Leave off the -y (in red) to see what would be updated, but not actually update
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Advertisements