Skip to content

Instantly share code, notes, and snippets.

@amad
Last active September 3, 2016 15:59
Show Gist options
  • Save amad/7a947914db8328a5857f to your computer and use it in GitHub Desktop.
Save amad/7a947914db8328a5857f to your computer and use it in GitHub Desktop.
free up /boot
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 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