How to Uninstall and Remove Homebrew for Mac OSX

Posted on September 30, 2013

Need to uninstall Homebrew for Mac OSX? This quick guide will help you completely remove it (and all associated packages) from your system.

Please let me know if you have any issues!

  • allister whitehead

    yeah , lots!
    rm: Cellar: Permission denied
    why is permission denied, how can I change this?

  • try using SUDO before the command.

  • Vikrant More

    i ran this bunch of code…but i can still see the brew executable and some other readme files in the usr/local folder…im not sure if the i’ve uninstalled homebrew successfully

  • Brou

    Warning: If you installed git via homebrew, this method won’t work.
    The second line -as mentioned- removes all installed packages (including git if you installed it via homebrew).
    My solution: Leaving git package (+ its 6 dependencies) installed on my computer. Which means :
    Execute: “brew install git”
    After “brew prune” and before “rm git ls-files“.
    This isn’t optimal, but enough for my cleanup objectives.

  • Stephen Benner

    I’ve written a script specifically for un-installing Homebrew, and in my opinion it is currently the best tool for the job.

    You can find it here.

Contact Us

Have a question? Send us a message. We'll get back to you soon.