LDAP: fix database cleanup in update  script