Originally published December 19, 2018 @ 11:41 am

Just a quick note on how to completely remove (more or less) Chef server installation from a CentOS/RHEL box.

There are a bunch of bits and pieces all over the place and it took me a few minutes to figure this out, so here it is:

chef-server-ctl uninstall
chef-manage-ctl cleanse
opscode-reporting-ctl uninstall
chef-server-ctl cleanse
/bin/rm /etc/init/private-chef-runsvdir.conf
kill -9 $(ps -ef | grep [o]pscode | awk '{print $2}')
/bin/rm -r /opt/opscode
cd /etc && tar cfz chef_$(date +'%F').tgz chef && /bin/rm -r chef
cd /etc && tar cfz chef-server_$(date +'%F').tgz chef-server && /bin/rm -r chef-server

I guess I’m planning on doing this a lot…