-
-
Save orangewolf/f689f22e85ceb772f6e5a7d4059d0938 to your computer and use it in GitHub Desktop.
A script to remove Rippling MDM.
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 | |
export PS4='+[$(date -u)][${BASH_SOURCE}:${LINENO}]: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'; set -x; | |
if [ `id -u` -ne 0 ]; then | |
echo "Rippling uninstall must be run by root" | |
exit 1 | |
fi | |
sudo launchctl unload /Library/LaunchDaemons/com.rippling.* | |
USER=$(stat -f "%Su" /dev/console) | |
su $USER -c 'launchctl remove com.rippling.tray' | |
sudo launchctl remove com.rippling.tray | |
sudo rm -rf /Applications/Rippling.app/ | |
sudo rm -rf '/Library/Application Support/Rippling/rippling_agent.json' | |
sudo rm -rf /Library/LaunchDaemons/com.rippling.* | |
sudo rm -rf /Library/LaunchAgents/com.rippling.* | |
sudo rm -rf /opt/rippling /opt/rippling-readonly | |
sudo rm -rf /usr/local/rippling | |
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "" | |
sudo defaults delete /Library/Preferences/Rippling AuthToken | |
# To remove any profile installed by Rippling | |
for identifier in $(sudo profiles -Lv | grep profileIdentifier | grep 'com.rippling.*' | awk '{print $4}' ) | |
do sudo profiles -R -p $identifier | |
done | |
sudo profiles -R -p "DD063D93-62A1-4BC6-A9C8-F48C4CBF2068" || true # The Rippling app notification profile | |
# Merciless uninstall of munki. | |
for pid in $(pgrep -f /usr/local/munki/) | |
do | |
echo "Killing munki process with pid: $pid" | |
kill -9 $pid || echo "No such process; $pid" | |
done | |
launchctl unload /Library/LaunchDaemons/com.googlecode.munki.* | |
rm -rf '/Applications/Utilities/Managed Software Update.app' | |
rm -rf '/Applications/Managed Software Center.app' | |
rm -rf '/Applications/Applications/Managed Software Center.app' | |
rm -rf '/Applications/msc.app' | |
rm -f /Library/LaunchDaemons/com.googlecode.munki.* | |
rm -f /Library/LaunchDaemons/com.rippling.munki.* | |
rm -f /Library/LaunchAgents/com.googlecode.munki.* | |
rm -rf '/Library/Managed Installs' | |
rm -rf /usr/local/munki | |
pkgutil --forget com.googlecode.munki.core | |
pkgutil --forget com.googlecode.munki.admin | |
pkgutil --forget com.googlecode.munki.app | |
pkgutil --forget com.googlecode.munki.launchd | |
pkgutil --forget com.googlecode.munki | |
sudo profiles -R -p com.rippling.munki | |
# Uninstall Nudge | |
launchctl unload /Library/LaunchAgents/com.github.macadmins.* | |
rm -rf '/Applications/Utilities/Nudge.app' | |
rm -f /Library/Preferences/com.github.macadmins.Nudge.json | |
pkgutil --forget com.github.macadmins.Nudge | |
# Uninstall pangolin | |
launchctl unload /Library/LaunchDaemons/com.rippling.daemon.plist | |
rm -f /Library/LaunchDaemons/com.rippling.daemon.plist | |
rm -rf /usr/local/rippling | |
# Uninstall any remaining profiles | |
rm -rf /var/db/ConfigurationProfiles/* | |
mkdir /var/db/ConfigurationProfiles/Settings | |
touch /var/db/ConfigurationProfiles/Settings/.profilesAreInstalled |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment