Skip to content

Instantly share code, notes, and snippets.

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 losinggeneration/5348140 to your computer and use it in GitHub Desktop.
Save losinggeneration/5348140 to your computer and use it in GitHub Desktop.
A naive script to remove old kernels from Debian
#!/bin/sh
find /boot -type f -mtime +90 -and -name "vmlinuz*" | while read i; do dpkg -S $i; done | cut -d":" -f1 | xargs dpkg -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment