Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save losinggeneration/5348140 to your computer and use it in GitHub Desktop.

Select an option

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