Hello,
I hope you are well, I am new using jamf pro, we want to launch a policy with a script to uninstall Malwarebytes from all Macs, I found the following script https://github.com/eth-its/autopkg-mac-recipes-yaml/blob/main/Scripts_for_Uninstallers/Application-uninstall.sh
We ran it on some laptops as a test, and it does remove the Malwarebytes application from Applications, but the icon still appears in the top bar, and if I click on it, it asks me if I want to restore or uninstall Malwarebytes.
Can you please help me to supplement the script to make the uninstallation completely and not give users a chance to restore malwarebytes.
Solved
Uninstall Malwarebytes app completely
Best answer by chrisB
I've stolen their own uninstaller script which can be found here:
/Library/Application Support/Malwarebytes/MBAM/Engine.bundle/Contents/Resources/Remove_Malwarebytes.pkg
You can use the postinstall script within the PKG or just run the PKG itself to remove Malwarebytes completely.
If you only want to get rid of the menu icon - this should work:
# Unload Malwarebytes' LaunchAgent
sudo launchctl bootout gui/$(ps -axo uid,args | grep -i "[l]oginwindow.app" | awk '{print $1}') /Library/LaunchAgents/com.malwarebytes.mbam.frontend.agent.plist
# Remove Malwarebytes' LaunchAgent
sudo rm -f /Library/LaunchAgents/com.malwarebytes.mbam.frontend.agent.plistEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
