Skip to content

Instantly share code, notes, and snippets.

@ahousseini
Last active June 23, 2023 15:03
Show Gist options
  • Save ahousseini/4facef3f5b56f8b7a57caf0b1333e61d to your computer and use it in GitHub Desktop.
Save ahousseini/4facef3f5b56f8b7a57caf0b1333e61d to your computer and use it in GitHub Desktop.
#!/bin/bash
# remote-switch.pkg
[[ -d "/Applications/Utilities/remote-switch.app" ]] && rm -rf "/Applications/Utilities/remote-switch.app"
[[ -n "$(pkgutil --pkg-info ch.anykey.pkg.remote-switch 2>/dev/null)" ]] && pkgutil --forget "ch.anykey.pkg.remote-switch"
# support-app-jamf-last-check-in-reader.pkg
[[ -s "/usr/local/bin/support-app-jamf-last-check-in-reader" ]] && rm -f "/usr/local/bin/support-app-jamf-last-check-in-reader"
[[ -n "$(pkgutil --pkg-info ch.anykey.pkg.support-app-jamf-last-check-in-reader 2>/dev/null)" ]] && pkgutil --forget "ch.anykey.pkg.support-app-jamf-last-check-in-reader"
# Support.$VERSION.pkg
[[ -d "/Applications/Support.app" ]] && rm -rf "/Applications/Support.app"
[[ -n "$(pkgutil --pkg-info nl.root3.support 2>/dev/null)" ]] && pkgutil --forget "nl.root3.support"
# SupportHelper$VERSION.pkg
[[ -s "/usr/local/bin/SupportHelper" ]] && rm -f "/usr/local/bin/SupportHelper"
[[ -n "$(pkgutil --pkg-info nl.root3.support.helper 2>/dev/null)" ]] && pkgutil --forget "nl.root3.support.helper"
if launchctl list | grep "nl.root3.support.helper"; then
launchctl bootout system "/Library/LaunchDaemons/nl.root3.support.helper.plist"
fi
if launchctl list | grep "nl.root3.support"; then
launchctl bootout system "/Library/LaunchAgents/nl.root3.support.plist"
fi
if pgrep -xq "Support"; then
killall "Support"
fi
[[ -s "/Library/LaunchDaemons/nl.root3.support.helper.plist" ]] && rm -f "/Library/LaunchDaemons/nl.root3.support.helper.plist"
[[ -s "/Library/LaunchAgents/nl.root3.support.plist" ]] && rm -f "/Library/LaunchAgents/nl.root3.support.plist"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment