Reinstalling brew


(Pablo) #1

Even though it’s not supported, I tried changing brew for a group-based permission installation (see: https://medium.com/@energee/install-brew-for-multiple-users-65af2444df5c).

It worked mostly fine until it didn’t. I am now getting permission errors for brew update. Some folders are not given the write permission on the group bit.

So, I’d like to revert to the shared brew account method where all users of my mac (running 10.14.3) can sudo to. Before I do that, I’d like to understand:

  1. If I run the uninstall script listed in the documentation FAQ is it going to remove all my formulae (and cask installations)? Just asking due to the next question.
  2. I am considering installing brew on a different location (e.g. /brew) and then creating an bash function/alias for every user: e.g.
brew  () { 
sudo -u brew /brew/brew $@
}

Would that be a really bad idea? :slight_smile:


(Sean Molenaar) #2
  1. Yes, otherwise it’d be a pretty bad uninstall :smiley:

  2. The last few lines of https://docs.brew.sh/Installation#untar-anywhere describe it pretty well. It’ll break things like bottles and some general installs might no longer work, while it’s possible it’s usually more trouble then it’s worth.


(Pablo) #3

Thanks @SMillerDev. What would be your general advice for a multi user install (considering your comment “usually more trouble then it’s worth”)?


(Sean Molenaar) #4

I’d say the best option is to make a seperate user that manages the default homebrew install and just give everyone access to that account through sudo. That way it’d be mostly like your suggested approach except with support for bottles etc.