Snippets

Jesse Almanrode Nvidia Cuda Uninstaller

Updated by Jesse Almanrode

File uninstall_cuda.sh Modified

  • Ignore whitespace
  • Hide word diff
 # https://discussions.apple.com/thread/5985600?tstart=0
 # https://devtalk.nvidia.com/default/topic/520257/uninstall-cuda-in-mac-/
 
-files="/Library/Frameworks/CUDA.framework\
-/Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist\
-/Library/PreferencePanes/CUDA\ Preferences.prefPane/\
-/System/Library/Extensions/CUDA.kext\
-/usr/local/cuda/lib/libcuda.dylib\"
+files="/Library/Frameworks/CUDA.framework
+/Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist
+/Library/PreferencePanes/CUDA\ Preferences.prefPane/
+/System/Library/Extensions/CUDA.kext
+/usr/local/cuda/lib/libcuda.dylib"
 
 
 MY_UID=$(id | grep 'uid=0(root)');
     exit 1;
 fi
 
-echo files | while read line; do
-    ls -d "$line";
-done
+echo "$files" | while read line; do
+    echo "Uninstalling $line";
+    rm -rf "$line" 2> /dev/null;
+done
+
+echo "Finished uninstalling CUDA... Please restart to finish uninstall";
+exit 0;
Updated by Jesse Almanrode

File uninstall_cuda.sh Modified

  • Ignore whitespace
  • Hide word diff
 #!/usr/bin/env bash
 # Uninstall CUDA Driver on OS X
+# This simple script was created based off the following threads:
+# https://discussions.apple.com/thread/5985600?tstart=0
+# https://devtalk.nvidia.com/default/topic/520257/uninstall-cuda-in-mac-/
+
 files="/Library/Frameworks/CUDA.framework\
 /Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist\
 /Library/PreferencePanes/CUDA\ Preferences.prefPane/\
Created by Jesse Almanrode

File uninstall_cuda.sh Added

  • Ignore whitespace
  • Hide word diff
+#!/usr/bin/env bash
+# Uninstall CUDA Driver on OS X
+files="/Library/Frameworks/CUDA.framework\
+/Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist\
+/Library/PreferencePanes/CUDA\ Preferences.prefPane/\
+/System/Library/Extensions/CUDA.kext\
+/usr/local/cuda/lib/libcuda.dylib\"
+
+
+MY_UID=$(id | grep 'uid=0(root)');
+if [ -z "$MY_UID" ]; then
+    echo "You must run this tool as root or using sudo";
+    exit 1;
+fi
+
+echo files | while read line; do
+    ls -d "$line";
+done
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.