How to uninstall Homebrew cleanly?
<p>I tried</p>

<pre><code>ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
</code></pre>

<p>But I got errors</p>

<pre><code>It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin Cellar CONTRIBUTING.md etc Frameworks heroku Homebrew include lib n opt README README.md sbin share SUPPORTERS.md var .gitignore
</code></pre>

<p>So I tried </p>

<pre><code>ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!
</code></pre>

<p>So I tried</p>

<pre><code>rm -rf /usr/bin/.git and chown username /usr/local
</code></pre>

<p>But still the same.
How can I fix this issue. I need to have a fresh start.
My final purpose is to update current ruby2.0 to 2.2</p>