Uninstall Malwarebytes app completely

jvaldes
New Contributor

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.

1 ACCEPTED SOLUTION

chrisB
Contributor

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

View solution in original post

3 REPLIES 3

chrisB
Contributor

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

jvaldes
New Contributor

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.

danlaw777
Contributor

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