Uninstall Homebrew

If your homebrew is completely messed up, it’s a good idea to remove everything and start off fresh:

Now you can reinstall with:

Switch between formula versions in Homebrew

When working with ROS on MacOS X and updating and upgrading your packages via Homebrew, you will often find your packages broken because some library was replaced by a newer one. A typical error looks like this:

Not too long ago, one would have just used brew versions and checked out the version needed, but that was long deprecated and has become unavailable recently. Nowadays, switch can be used instead:

Now you can easily switch back to r116 by:

Fix Homebrew .gitignore Permission denied

This morning when updating my brew, I was greeted by the following error:

This can be fixed by: