Skip to content

Instantly share code, notes, and snippets.

@mauromorales
Created May 25, 2013 11:52
Show Gist options
  • Save mauromorales/5648838 to your computer and use it in GitHub Desktop.
Save mauromorales/5648838 to your computer and use it in GitHub Desktop.
Clean up old linux kernels WARNING: ONLY RUN AFTER UPDATING, UPGRADING AND REBOOTING SUCCESSFULLY taken from: http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot
# clean up old kernels
# WARNING: ONLY RUN AFTER UPDATING, UPGRADING AND REBOOTING SUCCESSFULLY
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