How to uninstall chef-client and the whole Chef package

FilBot3 picture FilBot3 · Jun 14, 2013 · Viewed 38k times · Source

Is uninstalling Chef-Client just as easy as removing the directory, and making sure its not in the rc files? Is there a way to use knife to uninstall chef-client?

--2013-06-26_EDIT--

Updating this question to say, how to remove chef and all its other pieces from OS X, and Linux after using 1.) The Omnibus installer, and 2.) A bootstrapped node? Since I was trying to use Chef on my Mac, and had RVM installed, chef would not work, so now, I need to figure out how to remove chef.

--2015-03-08 EDIT --
Seems Opscode has put out their own instructions for uninstalling ChefDK. As far as the agent goes, it'd be the same method, using the package manager, or Add/Remove Programs.
http://docs.chef.io/install_dk.html#uninstall

Answer

FilBot3 picture FilBot3 · Jul 26, 2013

To help answer my own question, I found that depending on how you install Chef, depends on how you uninstall it. You can do the:

Redhat/CentOS

rpm -qa *chef*
yum remove <package>

Or if you installed it with ruby gems:

gem uninstall chef-<version>

However, for using an Omnibus installer, there wasn't an RPM package, and on my Mac OSX 10.6.8, I couldn't find anything about it. So, I realized that chef is self-contained, so I just deleted the directory in the /opt/ directory. Once I did that, I was able to use my RVM Ruby's.

--2015-03-08--
Opscode provides their own instructions for uninstalling ChefDK, and the Agent.
http://docs.chef.io/install_dk.html#uninstall