Bomgar Uninstall Script

KyleEricson
Valued Contributor II

I need to update Bomgar Jump Clients for Mac. Does anyone have a uninstall script for this?

Read My Blog: https://www.ericsontech.com
3 REPLIES 3

koalatee
Contributor II

You can technically remove all of the components with the commands below, but you will still have a record in the Bomgar Rep Console. I might recommend mass-selection > right-click > remove and then push it out again to everyone. Maybe make your policy ongoing to a smartgroup of those that do not have the specific pkg installed.

#!/bin/sh
        pkill -f bomgar
        launchctl unload /Library/LaunchAgents/com.bomgar.bomgar-scc*
        rm -rf /Users/Shared/bomgar-scc*
        rm -rf /Library/LaunchAgents/com.bomgar.bomgar-scc*
        rm -rf /Library/LaunchDaemons/com.bomgar.bomgar-ps*

daniel_behan
Contributor III

If you upgrade the console, the Jump Clients should auto-update, but I had a case in which they didn't. I had to create an Extension Attribute to list the Jump Client version and scope the uninstall script to machines on the old version.

!/bin/sh

bomgarpresent=$( /bin/ls -d /Users/Shared/bomgar* | /usr/bin/awk -F "Contents" '{ print $1 }' | /usr/bin/cut -d ':' -f1 )
result=$( /usr/bin/defaults read $bomgarpresent/Contents/Info CFBundleGetInfoString | /usr/bin/cut -d ' ' -f1 )
/bin/echo "<result>$result</result>"

afurbee
New Contributor

The following should work, you will still have an entry in the console though.

sudo /Users/Shared/bomgar-scc-20170705-124956.app/Contents/MacOS/sdcust -uninstall silent