Malwarebytes Uninstall

Antivirus and other endpoint security tools are fairly notorious for being difficult to uninstall, so I wanted to write a few posts about different uninstall tools and processes as I figure out how to remove them. This is how to remove Malwarebytes, and do so silently through an MDM or with a script.

Malwarebytes makes an uninstaller app that you can download from their website, however in order to run it, you need to interact with the app, making it difficult to deploy in bulk.

If you pull apart the app package, inside the contents of the app, in the resources section, there is a script called uninstall_reinstall.tool which is actually just a bash script in disguise.

If you open the contents in a text editor, you can see the script. You can take this script and run it, and it will work directly, however it attempts to get you to reinstall it at the end, or switch to the “home” version. Still not ideal for bulk deployment.

Here’s what the original script looks like -

At the end of the script there is a function for User Input called run install function which runs several AppleScripts for the user input. You can simply remove this section and it will make the script completely silent.

Final version with the removed Apple Scripts is here -