Skip to content

Instantly share code, notes, and snippets.

@mrschyte
Created November 10, 2018 12:45
Show Gist options
  • Save mrschyte/6fffc9cde7ebd41a448904d121418adf to your computer and use it in GitHub Desktop.
Save mrschyte/6fffc9cde7ebd41a448904d121418adf to your computer and use it in GitHub Desktop.
#!/bin/sh
version="$1"
bootdir=/boot
# passing the kernel version is required
[ -z "${version}" ] && exit 0
# absolute file name of kernel image may be passed as a second argument;
# remove the initrd from the same directory
if [ -n "$2" ]; then
bootdir=$(dirname "$2")
fi
# delete uefi bundle
rm -f "$bootdir/efi/EFI/Linux/linux-${version}.efi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment