ldapdelete opens a connection to an LDAP server, binds, and deletes one or more entries. If one or more dn arguments are provided, entries with those distinguished names are deleted. If no dn arguments are provided, a list of DNs is read from file, if the -f option is specified, or from standard input.
Show what would be done, but don't actually delete entries. Useful in conjunction with -v and -d for debugging.
Use verbose mode, with diagnostics written to standard output.
Continuous operation mode. Errors are reported, but ldapdelete will continue with deletions. The default is to exit after reporting an error.
To request more than one category of debugging information, add the masks. For example, to request trace and filter information, specify a debuglevel of 33.
Read the entry deletion information from file instead of from standard input.
Use the distinguished name binddn to bind to the directory.
Use passwd as the password for authentication to the directory.
Specify an alternate host on which the slapd server is running.
Specifies the authentication mechanism used to bind to the directory. This option can have the value CRAM-MD5. The bind DN and bind password are mandatory with this option.
Specify an alternate TCP port where the slapd server is listening.
Specifies one or several distinguished names of entries to delete.
example% ldapdelete "cn=Delete Me, o=XYZ, c=US" -D "cn=Administrator, o=XYZ, c=US" -w password
See attributes(5) for a description of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message is written to standard error.