Posted on 09-06-2022 04:55 PM
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-u...
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! Go to Solution.
Posted on 09-07-2022 03:04 AM
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.plist
Posted on 09-07-2022 03:04 AM
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.plist
Posted on 09-09-2022 07:06 AM
Thank you so much! I completed the script adding the information, and it worked, and the icon disappeared from the top of the screen to the users.
Posted on 09-07-2022 05:31 AM
If you go to the Malwarebytes console webpage and delete the mac in question from their, it should delete the package from the Mac, i had great success, no failures, in doing it that way
Posted on 01-04-2024 02:17 PM
This worked great for us. Thanks @chrisB