Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so I followed this guide:

to install and configure ldap but then I discoverd both phpLDAPadmin and Luma and have decided to rebuild my tree from scratch using one of those tools. However Im not sure how to completely remove LDAP now. I can remove it using apt-get, but if I attempt to reinstall it and login using phpLDAPadmin it seems that it's still looking for older authentication and gives me a credential error

share|improve this question

A simple sudo dpkg-reconfigure slapd should perform the task.

share|improve this answer
I mucked up my ldap configuration and this worked for me. – nerak99 Sep 8 '15 at 8:36
apt-get remove --purge package

apt-get remove [--purge] Removes and any packages that depend on it. --purge specifies that packages should be purged

The difference between remove and purge is that while remove only deletes data and executables, purge also deletes all configuration files in addition.

share|improve this answer
if you manually add file to ldap configuration directory, you should issue an addition command: rm -rf /etc/ldap – HVNSweeting Apr 17 '13 at 10:55

If you only want to remove the LDAP content, you can delete /var/lib/ldap/*. Please remember to keep the DB_CONFIG (if existing) file in this directory since it is important for performance tuning of the DB backend.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.