Use the LDIF delete subcommand to delete a specific attribute value from an attribute.

  1. Run the ldapmodify tool from the command line.
  2. Specify the modification using changetype:modify.
  3. Specify the attribute pair that you want to delete using delete.

    The following sample assumes you have multiple values of cn in an entry, such as cn: Sally Tree, cn: Sally Tea Tree. This sample keeps cn:Sally Tree and deletes the cn: Sally Tea Tree.

    $ bin/ldapmodify -h -p 389 -D "cn=admin,dc=example,dc=com" \
      -w password
    dn: uid=user.2004,ou=People,dc=example,dc=com 
    changetype: modify 
    delete: cn 
    cn: Sally Tea Tree