Skip to content

Instantly share code, notes, and snippets.

@Khalian
Created February 5, 2016 18:19
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 Khalian/e1b6dac81714793098b0 to your computer and use it in GitHub Desktop.
Save Khalian/e1b6dac81714793098b0 to your computer and use it in GitHub Desktop.
Run the script with superuser privileges, first argument is the linux kernel version to remove
rm -rf "/lib/modules/$1"
rm -f "/boot/vmlinuz-$1*"
rm -f "/boot/initrd.img-$1*"
rm -f "/boot/config-$1*"
rm -f "/boot/System.map-$1*"
update-grub2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment