Remove Open Directory data
If you're not able to remove an Open Directory (OD) master or replica using Server app, you can use the Terminal to remove them.
These steps delete all existing server data related to Open Directory, including users and groups.
Data in other services associated with these users and groups, while not removed, becomes inaccessible even if the same short name is used to create a new user. This is because data is associated with a user's Generated Unique Identifier (GUID). This number is always newly generated when you set up a user. For users to regain access to this data, it's recommended that you export users and groups before destroying your OD. An export using default settings includes GUIDs.
Additionally it is recommended that you have a complete backup of your server before performing these steps.
1. Close the Server app.
2. Use the following command in Terminal.
sudo slapconfig -destroyldapserver
3. Restart the computer.
Repeat these steps for any existing replica, as this article assumes the Open Directory structure can't be repaired. After using these steps, Open Directory should be set to "off" and ready to configure again from Server app.