3.4 Deleting Entries

You can use an LDIF change to delete entries. A delete change record requires two items: the distinguished name of the entry to delete and the delete changetype. Container entries cannot be deleted unless they are empty.

The following example deletes the entries created in the adding entries example. The entries are deleted in reverse order of adding so that the container entries are empty.

 version: 1
 
 dn: cn=Kim Jones, ou=English, ou=Humanities, o=UofZ
 changetype: delete
 
 dn: ou=English, ou=Humanities, o=UofZ
 changetype: delete
 
 dn: ou=Humanities, o=UofZ
 changetype: delete