How to Completely Uninstall Microsoft Defender on macOS
Question details
The user needs to completely remove Microsoft Defender from a Mac, determining if deleting the app is sufficient or if offboarding and terminal commands are required for a clean uninstall.

- Product
- Microsoft Defender
- Device & OS
- macOS
- Scenario
- Uninstalling the antivirus software and ensuring all associated background services, files, and management profiles are successfully deleted.
- Observed behavior
- Simply dragging the application to the Trash may leave residual files or fail entirely if the device is managed by an organization, requiring a dedicated offboarding and script uninstallation process.
Ensure you have administrator privileges on your Mac. If your device is managed by an organization via Microsoft Defender for Endpoint, you must contact your IT administrator to offboard the device before attempting to uninstall the software.
Run the Official Uninstaller via Terminal
This is the recommended and most reliable method to remove all components of Microsoft Defender on supported macOS versions.
Using the built-in terminal script provided by Microsoft ensures that system extensions, background services, and application files are completely purged from your Mac without leaving orphaned files.
Navigate to Finder > Applications > Utilities, and double-click on Terminal to open the command line interface.
Copy and paste the following command exactly into the Terminal window: sudo '/Library/Application Support/Microsoft/Defender/uninstall/uninstall' and press Return.
Enter your Mac administrator password when prompted. Note that characters will not appear on the screen as you type. Press Return to confirm.
Allow the script to run until you see a confirmation message in Terminal indicating the uninstallation is finished.

Offboard Device and Remove via Finder
Required for Microsoft Defender for Endpoint installations that are managed by a corporate network.
Try WPS Office as a Lightweight Alternative for Mac
If you are re-evaluating your Microsoft ecosystem on your Mac, consider WPS Office. It is a fast, highly compatible, and free alternative to Microsoft Office that does not rely on heavy background services, offering a seamless experience for your daily productivity needs.
- 1. Download WPS Office: Visit the official WPS Office website and download the macOS installation package.
- 2. Install on your Mac: Open the downloaded .dmg file and drag the WPS Office icon into your Applications folder.
- 3. Launch and start working: Open WPS Office from Launchpad, sign in, and immediately start creating or editing your existing Office files.

Frequently Asked Questions
Why can't I just drag Microsoft Defender to the Mac Trash?
Dragging the application to the Trash only removes the main user interface. It leaves behind deep system extensions, background security services, and quarantine files that can continue to consume system resources. Using the official Terminal uninstaller guarantees all these components are properly removed.
Where are the quarantined items stored on a Mac before uninstallation?
Quarantined files are managed securely in isolated system folders by Defender. It is highly recommended to review and either restore or permanently delete these items via the Microsoft Defender interface before uninstalling, otherwise, the encrypted files might become orphaned and permanently inaccessible on your drive.
What should I do if the Terminal uninstaller says 'command not found'?
This error means the uninstaller script is missing, the application was already partially removed, or the path is incorrect. Verify that Microsoft Defender is installed in the default directory. If it is partially deleted, you may need to reinstall Microsoft Defender first to restore the uninstaller file before properly removing it again.




