Forked from opragel/uninstall_microsoft_office_2011.sh
Created
October 24, 2016 16:39
-
-
Save pythoninthegrass/4a9ac297103f9a75a1886e22bbeb1c3d to your computer and use it in GitHub Desktop.
uninstall_microsoft_office_2011.sh
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 | |
# ¯\_(ツ)_/¯ | |
REMOVE_PATHS=( "/Applications/Microsoft Office 2011/" \ | |
"/Library/Preferences/com.microsoft.office.licensing.plist" \ | |
"/Library/LaunchDaemons/com.microsoft.office.licensing.helper.plist" \ | |
"/Library/PrivlegedHelperTools/com.microsoft.office.licensing.helper" \ | |
#"/Users/*/Library/Application Support/Microsoft/Office/" \ | |
#"/Users/*/Library/Preferences/com.microsoft*" \ | |
#"/Users/*/Library/Preferences/ByHost/com.microsoft*" \ | |
"/Library/Receipts/Office2011_*" ) | |
for removePath in "${REMOVE_PATHS[@]}" | |
do | |
if [ -e "$removePath" ]; then | |
printf "Deleting: %s\n" "$removePath" | |
rm -rf "$removePath" | |
else | |
printf "Not found: %s\n" "$removePath" | |
fi | |
done | |
for pkg in $(pkgutil --pkgs | grep com.microsoft.*14*);do | |
pkgutil --forget "$pkg" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment