Reset Profile Manager to its original state

If you have migrated from another version of macOS Server but want to start over, you can reset Profile Manager.

Before you begin

Make sure that you want to reset Profile Manger before using these steps. You should only reset Profile Manager if your original migration from an earlier version of Server didn't work, or if you want to set your server to a pre-macOS upgrade state.

After resetting Profile Manager, post-migration device settings might be reverted if you push changes out to a device, or if your profile is manually installed on a device:

  • Resetting Profile Manager to its original state in Yosemite or later removes all profiles, devices, and device groups.
  • Devices associated with the Device Enrollment Program will need to be reenrolled through Profile Manager.
  • Devices associated with the Volume Purchase Program will need to be set up again in Profile Manager.
  • Devices assigned to users will need to be reassigned in Profile Manager.
  • Users who had apps assigned will need to be reinvited through Profile Manager.
  • Any profiles installed on devices will need to be set up again in Profile Manager.

Profile Certificates aren't removed as part of these steps.

To reset Profile Manager data on OS X Yosemite or later

Use this Terminal command as an administrator to reset Profile Manager. Enter an administrator password when prompted.

sudo /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/wipeDB.sh

If this was a upgrade or migration, Profile Manager should be ready. If this wasn't an upgrade or migration, use these steps.

  1. Open Server.app and click on Profile Manager. Profile Manager should be be off, and Device Management should be disabled. You might need to wait a few moments for the status of these settings to update.
  2. Click on Configure and continue with setup.
  3. Turn Profile Manager on.

To reset Profile Manager and clear all data on OS X Yosemite or later

If you don’t want to re-migrate your previous Profile Manager data, use these Terminal commands. Only use these commands once. After the commands are run, migration data is erased and re-migration is no longer an option. 

Use these commands while logged in as an administrator:

sudo serveradmin stop devicemgr
sudo serverctl disable service=com.apple.DeviceManagement.devicemgrd
sudo serverctl disable service=com.apple.DeviceManagement.postgres
sudo killall -9 -u _devicemgr dmrunnerd devicemgrd migration_tool sd_relocator dmpgHelper
sudo mv /Library/Server/ProfileManager/Config/ServiceData/Data/PostgreSQL ~/.Trash/PostgreSQL_$RANDOM
sudo mv /Library/Server/ProfileManager/Config/ServiceData/Data/backup ~/.Trash/backup_$RANDOM
sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/deviceManagerCommon.sh

After using the Terminal commands, follow these steps:

  1. Open Server.app and click on Profile Manager. Profile Manager should be be off, and Device Management should be disabled. You might need to wait a few moments for the status of these settings to update.
  2. Click on Configure.
  3. Complete the setup, then turn Profile Manager on.
Last Modified: