Skip to content

Instantly share code, notes, and snippets.

@krypted
Created May 7, 2016 21:53
Show Gist options
  • Save krypted/6a2b66c2bff911b84e49108dafd98826 to your computer and use it in GitHub Desktop.
Save krypted/6a2b66c2bff911b84e49108dafd98826 to your computer and use it in GitHub Desktop.
#/bin/bash
#very dangerous as it unrecoverably removes all profilemanager data
sudo /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/wipeDB.sh
sudo serveradmin stop devicemgr
sudo serverctl disable service=com.apple.DeviceManagement.postgres
sudo rm -R /Library/Server/ProfileManager/Config/ServiceData/Data/backup
sudo rm -R /Library/Server/ProfileManager/Config/ServiceData/Data/PostgreSQL
sudo /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/CommonExtras/80-devicemgrcommon.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment