10

I just installed ruby via

brew install ruby

I have been advised to install it via RVM, even if I use Homebrew, but first I want to uninstall the ruby that homebrew just installed.

Can I simply do

brew uninstall ruby

Or do I need to do something else?

k1eran
  • 3,922
  • 4
  • 44
  • 67
cchiera
  • 2,644
  • 11
  • 36
  • 59
  • http://stackoverflow.com/questions/7323261/uninstall-remove-a-homebrew-package-including-all-its-dependencies – Zabba Sep 05 '12 at 20:03

2 Answers2

17

Yes, brew uninstall ruby should do the trick.

For more info, you can type man brew in your terminal.

Ylan S
  • 1,661
  • 15
  • 9
4

Doing brew uninstall ruby will work. If you really want to be sure, you can run brew cleanup after running the first command. Homebrew just removes unnecessary packages with the brew cleanup command. In some cases, the last command is necessary for the formula to be completely gone. (An example is with the tree formula, I had to use brew cleanup for it to be entirely uninstalled.)

(I know this is late but this can apply to anyone who is viewing this)

ShrubtheBub
  • 106
  • 1
  • 5
  • It won't work because of the updated security Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. – Edgar Khimich Feb 24 '21 at 20:52