Sterilizing for FreeIPA uninstall

It is high Test season here in FreeIPA land, as we gear up for the GA of The 2.0 Release.  One thing that I’ve found necessary is to set a machine into “Vanilla” state without going through the complete install process.  Getting rid of all vestiges of an IPA install requires removing files that are not cleaned up in an “rpm erase” call.  This is my script to reset my machine.  Warning.  It removes your data.  Duh.  It also cleans up The Dogtag Certificate server and tomcat6 installs, since those are dependencies for IPA that are undergoing significant development as well.

ipa-server-install -U --uninstall

pushd /var/lib/ipa/
rm -f ca*
rm -f *.txt
rm -f sysrestore/*
popd

pushd /var/lib/dirsrv/
rm -rf scripts*
popd

pushd /etc/dirsrv/
ls
popd

pushd /var/run/dirsrv/
rm -rf slapd*
ls
popd

pushd /etc/ipa
rm -f ca.crt
popd

pushd /var/log/dirsrv
rm -rf slapd*
popd

yum erase -y `rpmquery -a | grep freeipa` `rpmquery -a | grep ^pki-` `rpmquery -a | grep tomcat6`  `rpmquery -a | grep httpd` 389-ds-base bind

1 thought on “Sterilizing for FreeIPA uninstall

  1. Hey Adam,
    To clean up some dogtag related cruft, you might also want to add the below stuff to remove other pki and tomcat related stuff(I do this on one of the local scripts for dogtag)
    ############
    # rm -rf /var/lib/pki* /var/log/pki* /etc/init.d/pki*

    # rm -rf /usr/share/pki /usr/share/tomcat5 /var/lib/tomcat5/
    ############

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.