One-liner to removal all but the current installed kernel: apt-get purge $( ls /boot/vmlinuz-* | grep -v $(uname -r) | xargs -r dpkg -S | cut -d: -f1 | sort | uniq ) Regards, - Robert