Skip to main content
Question

A script to Remove Existing Meraki Components and Unenroll from SystemsManager

  • July 14, 2017
  • 3 replies
  • 48 views

Forum|alt.badge.img+12

Are you migrating from CiscoMerkai SystemsManager? Here's a script that @HCSTech wrote (with a tiny bit of help from me) to remove both the agent and the profile.

Also you might want to see this article on how to add this as a preinstall script to your QuickAdd package.

#!/bin/sh

####################################################
## Remove Existing Meraki Components and Unenroll MDM
####################################################

#!/usr/bin/env bash 

launchctl unload /Library/LaunchDaemons/com.meraki.agentd.plist
/bin/rm -f /usr/sbin/m_agent /usr/sbin/m_agent_upgrade
/bin/rm -rf '/Library/Application Support/Meraki/'
/bin/rm -f /Library/LaunchDaemons/com.meraki.agentd.plist

/usr/bin/profiles -R -p com.meraki.sm.mdm


exit 0
exit 1

3 replies

Forum|alt.badge.img+3
  • New Contributor
  • 6 replies
  • July 17, 2017

We just went through the same change and put together almost exactly the same script. Works really well!


Forum|alt.badge.img+5
  • Contributor
  • 29 replies
  • August 24, 2017

Thank you @arekdreyer. So far so good over here.


Forum|alt.badge.img+4
  • Contributor
  • 20 replies
  • June 16, 2020

/usr/bin/profiles -R -p com.meraki.sm.mdm
That was the one part I didn't include. Thanks