Installing or uninstalling the macOS Agent

SECURITY Administrator permissions on the device
NAVIGATION Sites > open a site > New Device
How to...

IMPORTANT For information about supported macOS versions, refer to Operating systems. For information about which services get installed, refer to Services, dependencies, and folders (Windows, macOS, Linux).
- Refer to the steps outlined in Downloading or emailing the Agent installer in the current UI or in Downloading the Agent or sharing the Agent installer in the New UI.
NOTE macOS devices can only be added to Managed sites.
- Open the downloaded or emailed file and unpack the .zip file.
- Open the AgentSetup folder and double click the file called CAG.pkg.
- Complete the wizard to install the Agent. Once the Agent has been installed, the Datto RMM icon will be displayed in the menu bar of your computer.
IMPORTANT When changing the hostname of a macOS device through the command line (scutil --set HostName), make sure that you add .local to the hostname. This is to avoid a potential issue of the Agent crashing.

- Open Terminal.
- Run the following commands:
curl -o agent.zip https://platform.centrastage.net/csm/profile/downloadMacAgent/siteID unzip -a agent.zip cd AgentSetup installer -pkg CAG.pkg -target /
IMPORTANT Make sure to replace platform and siteID with the appropriate values. The platform is found at the beginning of the URL when you are logged in to Datto RMM (e.g. https://concord.centrastage.net). The site ID can be found within the Sites tab, or from Sites > [Site Name] > Settings under the ID field.
- Complete the wizard to install the Agent. Once the Agent has been installed, the Datto RMM icon will be displayed in the menu bar of your computer.

- Open Terminal.
- Run the following command:
sudo bash /Applications/AEM\ Agent.app/Contents/Resources/uninstall.sh
- The Agent will now be uninstalled from the device.

If you have problems reinstalling the Agent on a macOS device, it may be necessary to completely remove the Agent from the device. After uninstalling the Agent using a local script, use one of the following methods:
Terminal
- Open Terminal.
- Enter the following commands, entering your password where prompted:
sudo rm -rf /usr/local/share/Centrastage
and
sudo rm -rf /var/root/.mono/registry/CurrentUser/software/centrastage
Finder
- If your preference is to use Finder, ensure you have enabled root. You can do so by following the instructions in this article.
Using the instructions for Lion will also work for later versions.
- Once the root user is enabled, type the following into Terminal to show all files in Finder:
defaults write com.apple.finder AppleShowAllFiles
and then
killall Finder
- If you are using Mavericks 10.9 or later, add -boolean true to the end of the first command so it looks like this:
defaults write com.apple.finder AppleShowAllFiles -boolean true
- Delete the following directory:
- /usr/local/share/Centrastage
- /var/root/.mono/registry/CurrentUser/software/centrastage