Skip to content

Instantly share code, notes, and snippets.

@otukutun
Created May 24, 2014 03:35
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save otukutun/0106977649dd765eb9b7 to your computer and use it in GitHub Desktop.
Save otukutun/0106977649dd765eb9b7 to your computer and use it in GitHub Desktop.
uninstall_chefdk_for_mac
#!/bin/bash
if [ -e /opt/chefdk ]; then
rm -rf /opt/chefdk
else
echo "can not found chefdk"
fi
rm /usr/bin/berks
rm /usr/bin/chef
rm /usr/bin/chef-apply
rm /usr/bin/chef-solo
rm /usr/bin/chef-zero
rm /usr/bin/chef-client
rm /usr/bin/chef-server-manager
rm /usr/bin/chef-shell
rm /usr/bin/fauxhai
rm /usr/bin/foodcritic
rm /usr/bin/kitchen
rm /usr/bin/knife
rm /usr/bin/nokogiri
rm /usr/bin/ohai
rm /usr/bin/rubocop
rm /usr/bin/ruby-parse
rm /usr/bin/ruby-rewrite
rm /usr/bin/shef
rm /usr/bin/strain
rm /usr/bin/strainer
rm /usr/bin/tt
pkgutil --forget com.getchef.pkg.chefdk
@cjohannsen81
Copy link

Hi,

thanks for the script. Had to customize the path to /usr/local/bin on my Mac.

!/bin/bash

if [ -e /opt/chefdk ]; then
rm -rf /opt/chefdk
else
echo "can not found chefdk"
fi

rm /usr/local/bin/berks
rm /usr/local/bin/chef
rm /usr/local/bin/chef-apply
rm /usr/local/bin/chef-solo
rm /usr/local/bin/chef-zero
rm /usr/local/bin/chef-client
rm /usr/local/bin/chef-server-manager
rm /usr/local/bin/chef-shell
rm /usr/local/bin/fauxhai
rm /usr/local/bin/foodcritic
rm /usr/local/bin/kitchen
rm /usr/local/bin/knife
rm /usr/local/bin/nokogiri
rm /usr/local/bin/ohai
rm /usr/local/bin/rubocop
rm /usr/local/bin/ruby-parse
rm /usr/local/bin/ruby-rewrite
rm /usr/local/bin/shef
rm /usr/local/bin/strain
rm /usr/local/bin/strainer
rm /usr/local/bin/tt

pkgutil --forget com.getchef.pkg.chefdk

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