Skip to content

Instantly share code, notes, and snippets.

@ericjsilva
Last active June 18, 2020 12:33
Show Gist options
  • Save ericjsilva/d1e2a90506ce3867ee21ae91b88e7472 to your computer and use it in GitHub Desktop.
Save ericjsilva/d1e2a90506ce3867ee21ae91b88e7472 to your computer and use it in GitHub Desktop.
Script to fully remove McAfee Endpoint Security from macOS
#!/bin/bash
echo "Uninstalling McAfee Endpoint Security..."
echo "Stopping all services..."
sudo ps auxww | grep -i 'VShieldScanner\|VShieldScanManager\|masvc\|McAfee' | grep -v grep | awk ‘{ print $2 }’ | sudo xargs kill -9; kextstat | grep -i mcafee | awk ‘{ print $6 }’ | sudo xargs -n1 -I{} kextunload -verbose 2 -bundle-id ‘{}’
echo "Uninstalling ATP..."
sudo /usr/local/McAfee/uninstall ATP
echo "Uninstalling ThreatPrevention and Firewall..."
sudo /usr/local/McAfee/uninstall ThreatPrevention Firewall module
echo "Uninstalling Endpoint Security..."
sudo /usr/local/McAfee/uninstall EPM
echo "Uninstalling McAfee Agent Services..."
sudo /Library/McAfee/cma/scripts/uninstall.sh
echo "Unloading Launch Agents..."
launchctl unload -F /Library/LaunchAgents/com.mcafee.*
echo "Remove McAfee VShield Services and Menulet..."
sudo rm -rf /usr/local/McAfee
sudo rm -rf /Library/Application\ Support/McAfee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment