Help with uninstall script for Bluecoat

olamike
New Contributor III

Hello,

Does anyone know of any script to uninstall Bluecoat oof a mac via Jamf or some other automated process of uninstalling Bluecoat unified agent.

thanks

3 REPLIES 3

swolosin
New Contributor III

If you're looking to uninstall Blue Coat Unified Agent. I'd suggest referring to this documentation: https://support.symantec.com/us/en/article.tech248066.html I'm guessing a Computer > Policy > Files & Processes > "Execute Command"

/Library/Application Support/bcua/Uninstall Blue Coat Unified Agent.app/Contents/MacOS/uninstall-helper

brain_epsilon
New Contributor II

I've read their documentation backwards and forwards and still not able to find a good solution to this....

I've tried that in the Execute Process piece and it runs without error, but the application is still running upon completion of the policy. Further, the files and contents under /Library/Application Support/bcua still are there and haven't been removed...

Upon doing some other research, I've noticed that there is a script to remove Symantec DLP "because the company's 'uninstaller' does not work"

I'm wondering if it's the case thing here...

mojo21221
Contributor II

Not sure if this still works. But when we wanted to get rid of BlueCoat we built our own. Create a policy that searches for and kills the process Blue Coat Unified Agent Also here is the script to run from the same policy

!/bin/bash

#Variables
agentLocation="/Library/Application Support/bcua"
kextLocation="/Library/Extensions/bcua.kext"
launchAgent="/Library/LaunchAgents/com.bluecoat.ua.notifier.plist"
launchDaemon="/Library/LaunchDaemons/com.bluecoat.ua.plist"
bcService="/opt/.bluecoat-ua/"


#unload daemons
/bin/launchctl unload $launchAgent
echo "$launchAgent has been unloaded"
/bin/launchctl unload $launchDaemon
echo "$launchDaemon has been unloaded"

#unload kext file
/sbin/kextunload $kextLocation
echo "Kext has been unloaded"

#check if service is still running
serviceStatus=`/bin/ps aux | grep bluecoat | grep -v grep | awk '{print $2}'`

if [ -z "$serviceStatus" ]; then
    echo "Process has been terminated"
else
    /bin/kill -9 $serviceStatus
fi
#Waiting for the service/agent to die
/bin/sleep 3

#remove files
/bin/rm -rf "$agentLocation"
/bin/rm -f "$kextLocation"
/bin/rm -f "$launchAgent"
/bin/rm -f "$launchDaemon"
/bin/rm -rf "$bcService"

#Exiting with joy
echo "Bluecoat has been removed, you may enjoy surfing the net"
echo "Rebooting the machine now"

Hope this script give you as much joy as it gave me. Also it could care less if there is a password preventing the uninstallation of BCUA