How to uninstall Bastion MDM on MACOS

Last updated: May 27, 2025

Setup Uninstallation

  1. Remove the MDM Profile:

    • Open System Settings (or System Preferences)

    • Navigate to Device Management (or Profiles on older macOS versions)

    • Select the MDM profile

    • Click the minus (-) button to remove it

  2. Remove the osquery agent by running the following commands in Terminal:

    sudo launchctl stop com.fleetdm.orbit
    sudo launchctl unload /Library/LaunchDaemons/com.fleetdm.orbit.plist
    sudo pkill bastion-desktop || true
    sudo rm -rf /Library/LaunchDaemons/com.fleetdm.orbit.plist /var/lib/orbit /usr/local/bin/orbit /var/log/orbit /opt/orbit/
    sudo pkgutil --forget com.fleetdm.orbit.base.pkg || true

Usage

After completing these steps, the MDM and its associated agent will be completely removed from your macOS device. You may need to restart your computer for all changes to take effect.