Created
October 22, 2010 01:33
-
-
Save ursm/639748 to your computer and use it in GitHub Desktop.
kclean
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 | |
for path in /usr/src/linux-*; do | |
version=${path#*/linux-} | |
if qfile $path > /dev/null; then | |
echo "$version: skip" | |
else | |
echo "$version: removing" | |
cmd="rm -rf $path /lib/modules/$version /boot/*-$version /boot/*-$version.old" | |
echo "$cmd" | |
$cmd | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment