Skip to content

Instantly share code, notes, and snippets.

@gwpl
Created November 22, 2016 20:58
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 gwpl/fb4a82a806e36f46c9558870ca2bfabf to your computer and use it in GitHub Desktop.
Save gwpl/fb4a82a806e36f46c9558870ca2bfabf to your computer and use it in GitHub Desktop.
/boot full on ubutu! Use last line or full script! Thanks: http://askubuntu.com/a/90219/31300 !
#!/bin/bash
echo Current active: "$(uname -r)"
echo Remove rest:
set -x
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment