Last active
October 23, 2023 20:04
-
-
Save focusmade/cf7d8321e059734887c464342c9edd7b to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Steps to clean Wacom files: | |
# 1. Disconnect your tablet from the computer. | |
# 2. Go to your Applications folder in Finder, and delete the Wacom Tablet folder. | |
# 3. Go to your Mac's main Library folder. | |
# 4. Check for and delete any of the following, if found: | |
# a. /Library/Application Support/Tablet | |
# b. /Library/Frameworks/WacomMultiTouch.framework | |
# c. /Library/Internet Plugins/WacomTabletPlugin.plugin | |
# d. /Library/LaunchAgents/com.wacom.* items | |
# e. /Library/LaunchDaemons/com.wacom.* items | |
# f. /Library/PreferencePanes/WacomTablet.prefpane | |
# g. /Library/Preferences/Tablet | |
# h. /Library/PrivilegedHelperTools/com.wacom.* items | |
# Steps to use the script: | |
# 1. Copy the script into a file, say `wacom_cleanup.sh`. | |
# 2. Open a terminal and navigate to the directory where you saved the script. | |
# 3. Make the script executable: `chmod +x wacom_cleanup.sh`. | |
# 4. Run the script: `./wacom_cleanup.sh`. | |
# WARNING: This script will delete files. Please make sure to back up your system before running it. | |
echo "Please make sure your Wacom tablet is disconnected from the computer before continuing." | |
read -p "Press enter to continue..." | |
# Delete the Wacom Tablet folder from Applications | |
echo "Deleting Wacom Tablet folder from Applications..." | |
rm -rf /Applications/Wacom\ Tablet/ | |
# List of paths to search and delete | |
declare -a paths=( | |
"/Library/Application Support/Tablet" | |
"/Library/Frameworks/WacomMultiTouch.framework" | |
"/Library/Internet Plugins/WacomTabletPlugin.plugin" | |
"/Library/PreferencePanes/WacomTablet.prefpane" | |
"/Library/Preferences/Tablet" | |
) | |
for path in "${paths[@]}"; do | |
if [ -e "$path" ]; then | |
echo "Deleting $path..." | |
rm -rf "$path" | |
else | |
echo "$path not found. Skipping..." | |
fi | |
done | |
# Delete specific items that match a pattern | |
declare -a patterns=( | |
"/Library/LaunchAgents/com.wacom.*" | |
"/Library/LaunchDaemons/com.wacom.*" | |
"/Library/PrivilegedHelperTools/com.wacom.*" | |
) | |
for pattern in "${patterns[@]}"; do | |
matches=$(ls "$pattern" 2> /dev/null) | |
if [ "$matches" ]; then | |
for match in $matches; do | |
echo "Deleting $match..." | |
rm -rf "$match" | |
done | |
else | |
echo "No matches for pattern $pattern. Skipping..." | |
fi | |
done | |
echo "Cleanup complete. Please reboot your system for changes to take effect." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment