Tiny Deathstars of Foulness

There are a number of instances when you cannot remove a replica from Open Directory using Server Admin. This can be due to a variety of reasons, but if you cannot remove the replica from Server Admin then try doing so using slapconfig. For example, if the replica has an IP of then the command would be:
slapconfig -removereplica

May 17th, 2009

Posted In: Mac OS X Server

Tags: , , ,

  • Edge is awesome!

  • Seems like it should be this now (in 10.6.8 at least)

    slapconfig -removereplica diradmin

  • Adi

    This doesn’t work. The replica is still there. This is what i get :

    pdc:~ admin$ sudo slapconfig -removereplica
    2015-05-01 18:32:45 +0000 slapconfig -removereplica
    2015-05-01 18:32:45 +0000 command: /usr/bin/kdestroy –credential=ldap/

    Any idea why the replica is not destroyed ?

    Thank you !

    • Justin

      same issue here

    • John Skinner

      Use ellipsegyyv’s answer from here

      Just add the DomainAdminName at the end of the command :
      sudo slapconfig -removereplica DomainAdminName

      • Adi

        Under 10.12.6 and Server 5.3.1, this doesn’t work :

        2017-09-05 19:34:36 +0000 slapconfig -removereplica
        2017-09-05 19:34:36 +0000 command: /usr/bin/kdestroy –credential=ldap/

        Nothing happens. Replica still shows up and the server is still trying to connect to it 🙁

  • Jon Gardner

    On the OD master:

    # dscl /LDAPv3/ read /Config/ldapreplicas

    Search the output for the IP address(es) and FQDN of the replica you’re trying to delete. Here, it’s “” and has two IP addresses:




    Then issue the slapconfig command using the –guid parameter:

    # sudo slapconfig -removereplica –guid 8964E35A-A08B-462A-9F37-E14E45AF3D3C

    If that doesn’t work, then configure another computer with the same FQDN as the missing replica, adjust the DNS parameters accordingly, and make that computer a replica. Its replica entry will replace the old one, and then you should be able to remove the replica in the normal fashion.