Skip to content

Instantly share code, notes, and snippets.

@andrewdacenko
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewdacenko/9e0df20ddc1415afdc79 to your computer and use it in GitHub Desktop.
Save andrewdacenko/9e0df20ddc1415afdc79 to your computer and use it in GitHub Desktop.
Get list of linux images and delete old from /boot
# run it with root user `sudo -s`
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
sudo dpkg --list 'linux-image*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment