Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Forked from kwilczynski/gist:491227d9813702e18151
Last active October 19, 2018 22:02
Show Gist options
  • Save pythoninthegrass/17790b8abe0ddc4d8898e8dd5a2e6b8a to your computer and use it in GitHub Desktop.
Save pythoninthegrass/17790b8abe0ddc4d8898e8dd5a2e6b8a to your computer and use it in GitHub Desktop.
Remove Chef Server
#!/usr/bin/env bash
chef-server-ctl stop
chef-server-ctl kill
chef-server-ctl cleanse
chef-server-ctl uninstall
pkill -9 -u opscode
pkill -9 -f postgres
pkill -9 -f beam
pkill -9 -f /opt/chef
rm -rf /etc/opscode /etc/chef /opt/opscode /opt/chef /var/chef
rm -rf /etc/chef-server /etc/chef /opt/chef-server /opt/chef /root/.chef /var/opt/chef-server
rm -rf /var/chef /var/log/chef-server
yum remove opscode-reporting-*
yum remove chef-manage-*
rpm -e chef-server
rpm -e chef-server-core
@pythoninthegrass
Copy link
Author

Ugly w/o error handling, but gets the job done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment