/usr/sbin/ds_removal -sserver_id-wadmin_password
ds_removal script unregisters the server from the Configuration Directory Server and removes any related files and directories. The key and cert files are left in the instance configuration directory, and the configuration directory is renamed instance-name.removed.
/usr/sbin/ds_removal -s example1 -w itsasecret /usr/sbin/ds_removal -s example2 -w itsasecret /usr/sbin/ds_removal -s example3 -w itsasecret
service dirsrv-admin stop
rpm -ev dirsec-nss dirsec-nspr dirsec-nss-tools --nodeps rpm -ev svrcore mozldap6 mozldap6-tools perl-Mozilla-LDAP --nodeps rpm -ev redhat-ds-base --nodeps rpm -ev redhat-ds-admin redhat-ds-console redhat-admin-console --nodeps rpm -ev idm-console-framework redhat-idm-console --nodeps
rpm -ev svrcore mozldap mozldap-tools perl-Mozilla-LDAP --nodeps rpm -ev redhat-ds-base --nodeps rpm -ev redhat-ds-admin redhat-ds-console redhat-admin-console --nodeps rpm -ev idm-console-framework redhat-idm-console --nodeps
/opt/dirsrv/sbin/ds_removal -s example1 -w itsasecret /opt/dirsrv/sbin/ds_removal -s example2 -w itsasecret /opt/dirsrv/sbin/ds_removal -s example3 -w itsasecret
/opt/dirsrv/sbin/stop-ds-admin
rm -Rf /export/ds80
rm -f /opt/dirsrv /var/opt/dirsrv /etc/opt/dirsrv
/usr/sbin/ds_removal -s example1 -w itsasecret /usr/sbin/ds_removal -s example2 -w itsasecret /usr/sbin/ds_removal -s example3 -w itsasecret
/etc/init.d/dirsrv-admin stop
#!/bin/bash
for i in `pkginfo | grep -i rhat | grep -vi rhatperlx | awk '{print $2}'`
do
pkgrm -n $i
done
echo "looking for any leftover RHAT packages ..."
pkginfo | grep RHAT