Created
May 7, 2015 11:27
-
-
Save sdvcrx/2c8a94c1f3eb5cdbcae5 to your computer and use it in GitHub Desktop.
Remove dkms module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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