The ulimate Linux kernal clean up command for Debian based systems.

dpkg -l | grep ^ii | grep "linux-image-[0-9]" | awk -F' ' '{ print $2 }' | \
grep -v `uname -r` | sed '$d' | sed '$d' | sed 's/linux-image//' | \
xargs -i echo "linux-image{} linux-headers{}" | xargs aptitude -y purge

 

Bad Behavior has blocked 295 access attempts in the last 7 days.