Linux – Ubuntu / Debian : Clear /boot

When you install new kernel, the old one is not uninstall.
To keep only the last one (after reboot and check everything is working) :

Short URL: http://sck.pm/wL84
  • dpkg –get-selections|grep ‘linux-image*’|awk ‘{print $1}’|egrep -v “linux-image-$(uname -r)|linux-image-generic” |while read n;do apt-get -y remove $n;done