Skip to content

Instantly share code, notes, and snippets.

@omgmog
Created May 29, 2013 18:32
Show Gist options
  • Save omgmog/5672581 to your computer and use it in GitHub Desktop.
Save omgmog/5672581 to your computer and use it in GitHub Desktop.
This is all the useful bits from the Blackberry Desktop for Mac uninstaller. Run as root: $ sh remove-blackberry.sh
#!/bin/sh
if [ $UID -ne 0 ]; then
echo "Script must run as root"
exit 1
fi
/Library/Application\ Support/Blackberry/BBLaunchAgent.app -ndefault /Applications/BlackBerry\ Desktop\ Manager.app >> /dev/null
rm -fr "/Applications/BlackBerry Desktop Manager.app"
rm -fr "/Library/Receipts/blackberrydesktopmanager.pkg"
rm -fr /Users/*"/Library/Application Support/BlackBerryDesktop/"
rm -f /Users/*"/Library/Preferences/com.rim.blackberrydesktopmanager.plist"
rm -fr /Users/*"/Library/Caches/com.rim.blackberrydesktopmanager"
/Library/Application\ Support/BlackBerry/BBLaunchAgent.app -ipndefault /Library/Application\ Support/BlackBerry/IPModemPasswordDialog.app >> /dev/null
rm -fr "/Library/Application Support/BlackBerry/IPModemPasswordDialog.app"
rm -fr "/Library/Modem Scripts/RIM IP Modem.ccl"
rm -fr "/Library/Frameworks/RIM_VSP.framework"
rm -fr "/Library/Receipts/blackberryvsp.pkg"
rm -f "/Library/Preferences/com.rim.vsp.plist"
rm -fr "/System/Library/Extensions/RIMBBVSP.kext"
rm -fr "/Library/Receipts/blackberryvspdr.pkg"
rm -f "/Library/Preferences/com.rim.RIMBBVSP.plist"
sudo -u "${currentUser}" launchctl unload /Library/LaunchAgents/com.rim.BBLaunchAgent.plist
launchctl unload /Library/LaunchDaemons/com.rim.BBDaemon.plist
rm -fr "/Library/Frameworks/RimBlackBerryUSB.framework"
rm -f "/Library/LaunchDaemons/com.rim.BBDaemon.plist"
rm -f "/Library/LaunchAgents/com.rim.BBLaunchAgent.plist"
rm -fr "/Library/Application Support/BlackBerry"
rm -fr "/Library/Receipts/blackberryframeworks.pkg"
rm -f "/Library/Preferences/com.rim.RimBlackBerryUSB.plist"
rm -f "/Library/Preferences/com.rim.RimLaunchAgent.plist"
rm -f /Users/*"/Library/Preferences/com.rim.RimLaunchAgent.plist"
rm -fr "/System/Library/Extensions/BlackBerryUSBDriverInt.kext"
rm -fr "/System/Library/Extensions/RIMBBUSB.kext"
rm -fr "/Library/Receipts/blackberryusbdriverint.pkg"
rm -f "/Library/Preferences/com.rim.BlackBerryUSBDriverInt.plist"
rm -f "/Library/Preferences/com.rim.RIMBBUSB.plist"
pkgutil --forget "com.rim.blackberrydesktopmanager.BlackBerryFrameworks.pkg"
pkgutil --forget "com.rim.blackberrydesktopmanager.BlackBerryUSBDriver.pkg"
pkgutil --forget "com.rim.blackberrydesktopmanager.BlackBerryUSBDriverVSP.pkg"
pkgutil --forget "com.rim.blackberrydesktopmanager.BlackBerryVSP.pkg"
pkgutil --forget "com.rim.blackberrydesktopmanager.Application.pkg"
killall BBLaunchAgent.app
rm -fr /Library/Application\ Support/BlackBerry/
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment