Skip to content

Instantly share code, notes, and snippets.

@goodjob1114
Created June 29, 2015 03:03
Show Gist options
  • Save goodjob1114/71f870801c49215fb4f6 to your computer and use it in GitHub Desktop.
Save goodjob1114/71f870801c49215fb4f6 to your computer and use it in GitHub Desktop.
[ubuntu] free boot disk space
#!/bin/bash
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment