Skip to content

Instantly share code, notes, and snippets.

@jweyrich
Last active January 27, 2021 06:55
Show Gist options
  • Save jweyrich/d974abc2c9800d7e7577060a367303f8 to your computer and use it in GitHub Desktop.
Save jweyrich/d974abc2c9800d7e7577060a367303f8 to your computer and use it in GitHub Desktop.
Citrix Receiver uninstaller for macOS
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
launchctl stop /Library/LaunchAgents/com.citrix.AuthManager_Mac.plist
launchctl stop /Library/LaunchAgents/com.citrix.ReceiverHelper.plist
launchctl stop /Library/LaunchAgents/com.citrix.ServiceRecords.plist
rm -rf "/Applications/Citrix Receiver.app/"
rm -rf "/Library/Application Support/Citrix Receiver/ctxusbd"
rm -rf "/Library/Internet plug-ins/CitrixICAClientPlugIn.plugin"
rm -rf "/Library/LaunchAgents/com.citrix.AuthManager_Mac.plist"
rm -rf "/Library/LaunchAgents/com.citrix.ServiceRecords.plist"
rm -rf "/Library/LaunchDaemons/com.citrix.ctxusbd.plist"
rm -rf "/Users/Shared/Citrix/"
rm -rf "/Users/Shared/Citrix Receiver"
rm -rf "~/Library/Internet plug-ins/CitrixICAClientPlugIn.plugin"
rm -rf "~/Library/Application Support/Citrix Receiver"
rm -rf "~/Library/Preferences/com.citrix.receiver.nomas.plist"
rm -rf "~/Library/Preferences/com.citrix.receiver.nomas.plist.lockfile"
rm -rf "~/Library/Preferences/com.citrix.ReceiverFTU.AccountRecords.plist"
rm -rf "~/Library/Preferences/com.citrix.ReceiverFTU.AccountRecords.plist.lockfile"
rm -rf "/private/var/db/receipts/com.citrix.ICAClient.bom"
rm -rf "/private/var/db/receipts/com.citrix.ICAClient.plist"
# Remove any applications installed via Citrix Receiver
#rm -r ~/Applications/*.app/
@AskFeeds
Copy link

AskFeeds commented May 15, 2019

From 10.11 onwards, macOS protects certain folders by using SIP (System Integrity Protection). It seems i can no longer be able to 'rm' the kext from terminal.
Guess the manual way still works:

~Library > Application Support > Citrix Receiver
~Library > Caches > com.citrix.receiver.momas
~Library > Caches > com.citrix.receiver.nomas.plist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment