Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Last active December 29, 2021 14:35
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 cmbaughman/89818774d4e8d01e596663eb3232d460 to your computer and use it in GitHub Desktop.
Save cmbaughman/89818774d4e8d01e596663eb3232d460 to your computer and use it in GitHub Desktop.
When apt fails because there are too many kernels installed in /boot, but apt autoremove --purge doesn't remove them...
#!/usr/bin/bash
sudo apt-mark auto $(apt-mark showmanual | grep -E "^linux-([[:alpha:]]+-)+[[:digit:].]+-[^-]+(|-.+)$")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment