Skip to content

Instantly share code, notes, and snippets.

@svenkrb
Created November 16, 2015 12:29
Show Gist options
  • Save svenkrb/0c19ebeaf8a33b2fde12 to your computer and use it in GitHub Desktop.
Save svenkrb/0c19ebeaf8a33b2fde12 to your computer and use it in GitHub Desktop.
One liner for ubuntu to cleanup installed kernels with exceptions
# Remove kernels and associated packages for all versions execpt meta required and versions X and Y
sudo aptitude purge '~i linux-(headers|image|tools) !lts !common !X !Y'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment