Skip to content

Instantly share code, notes, and snippets.

@bradjasper bradjasper/
Last active Aug 29, 2015

What would you like to do?
Remove Focus
ACTIVE_NETWORK=$(echo "open|||get Setup:/Network/Service/$(echo "open|||get State:/Network/Global/IPv4|||" | tr '|||' '\n' | scutil | grep "PrimaryService" | awk '{print $3}') |||" | tr '|||' '\n' | scutil | grep "UserDefinedName" | awk -F': ' '{print $2}')
echo "Active network is '$ACTIVE_NETWORK'"
echo "Turning off active network PAC"
sudo networksetup -setautoproxystate "$ACTIVE_NETWORK" off
echo "Removing NSUserDefaults"
rm -rf ~/Library/Preferences/BradJasper.focus*
rm ~/Library/Containers/BradJasper.focus/Data/Library/Preferences/BradJasper.focus.plist
defaults delete BradJasper.focus
echo "Removing CoreData"
rm -rf ~/Library/Application\ Support/Focus/
echo "Killing helper tool"
ps aux | grep BradJasper.focus.HelperTool | grep -v grep | awk '{print $2}' | xargs sudo kill -9
sudo rm -rf /Library/PrivilegedHelperTools/BradJasper.focus.HelperTool
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.