The ldapdelete Command-Line Tool

Delete one or more entries from an LDAP directory server. You can provide the DNs of the entries to delete using named arguments, as trailing arguments, from a file, or from standard input. Alternatively, you can identify entries to delete using a search base DN and filter.

Usage

ldapdelete {arguments} [{dn1} [{dn2} [{dn3} ...] ] ]

LDAP Connection and Authentication Arguments

Data Arguments

Delete Operation Arguments

Control Arguments

Additional Arguments

Dependent Argument Sets

Exclusive Argument Sets

Examples

    ldapdelete --hostname ds.example.com --port 636 --useSSL \
         --bindDN uid=admin,dc=example,dc=com \
         uid=test.user,ou=People,dc=example,dc=com
    ldapdelete --hostname ds.example.com --port 636 --useSSL \
         --trustStorePath trust-store.jks \
         --bindDN uid=admin,dc=example,dc=com \
         --bindPasswordFile admin-password.txt --dnFile dns-to-delete.txt
    ldapdelete --hostname ds.example.com --port 389 --useStartTLS \
         --trustStorePath trust-store.jks \
         --bindDN uid=admin,dc=example,dc=com \
         --bindPasswordFile admin-password.txt \
         --deleteEntriesMatchingFilter "(description=delete)"
    ldapdelete --hostname ds.example.com --port 389 \
         --bindDN uid=admin,dc=example,dc=com