Skip to content

Instantly share code, notes, and snippets.

@sdvcrx
Created May 7, 2015 11:27
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 sdvcrx/2c8a94c1f3eb5cdbcae5 to your computer and use it in GitHub Desktop.
Save sdvcrx/2c8a94c1f3eb5cdbcae5 to your computer and use it in GitHub Desktop.
Remove dkms module
#!/bin/bash
if [ -z "$1" ] ; then
echo "$(basename "$0") kernel-ver"
exit 1
fi
PACKAGES=(`dkms status | grep "$1" | awk -F ', ' '{ print $1"/"$2 }'`)
for pkg in "${PACKAGES[@]}" ; do
echo "Remoing $1 $pkg ..."
sudo dkms remove -k "$1" $pkg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment