Skip to content

Instantly share code, notes, and snippets.

@kamawanu
Created December 21, 2016 01:02
Show Gist options
  • Save kamawanu/bd020e216f9fd81c92e68d4a70fc880e to your computer and use it in GitHub Desktop.
Save kamawanu/bd020e216f9fd81c92e68d4a70fc880e to your computer and use it in GitHub Desktop.
#!/bin/bash -,x
KVER=$( uname -r )
ls -1 /boot/vmlinuz-* | cut -d/ -f3- | fgrep -v signed | sort -t- -k3 -n | sed -e "s/vmlinuz/linux-signed-image/;/$KVER/,\$d" | sudo xargs apt-get remove -yq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment