#!/bin/bash # Remove ALL Altiris/Symantec Agents # Kill the Plugin Manager kill $(ps -A | grep -m1 aex-pluginmanager-bin | awk '{print $1}') # Remove Altiris folder rm -rf /opt/altiris # Remove SymLinks in /usr/bin rm -rf /usr/bin/aex* # Remove Symantec App rm -rf "/Applications/Utilities/Symantec Management Agent.app" # Stop then remove the SMAgent launchctl unload com.symantec.SMAgent.plist rm /Library/LaunchDaemons/com.symantec.SMAgent.plist # Remove receipts (one way. The other is to use the pkgutil command to remove the entries) # Be careful here. If you use SEP then you might want to selectively remove the package receipts that you don't want. # Un-REM the following lines to explicitly delete the package receipts if the pkgutil commands are not working. #rm /var/db/receipts/com.altiris* #rm /var/db/receipts/com.Symantec* for package in `pkgutil --pkgs | grep Sym | awk '{print $1}'` do pkgutil --forget $package done for package2 in `pkgutil --pkgs | grep alti | awk '{print $1}'` do pkgutil --forget $package2 done exit 0