Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update a formula with Homebrew?

People also ask

Where are Homebrew formulae stored?

Packages are installed according to their formulae, which live in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula .

How do I update apps with brew?

The first step is to run brew update . It updates Homebrew code and the taps (a tap is a repository of programs managed by Homebrew). Homebrew Cask provides the sub-command brew cask update but it is just an alias of brew update . You can use any of them; brew update is preferred because it is shorter.


To upgrade just the MongoDB formula, the correct way is

brew install mongodb

If you want to upgrade all outdated formulae, simply do

brew upgrade

You can update all outdated packages like so:

brew install `brew outdated`

or

brew outdated | xargs brew install

or

brew upgrade

This is from the brew site..

for upgrading individual formula:

brew install formula-name && brew cleanup formula-name

You will first need to update the local formulas by doing

brew update

and then upgrade the package by doing

brew upgrade formula-name

An example would be if i wanted to upgrade mongodb, i would do something like this, assuming mongodb was already installed :

brew update && brew upgrade mongodb && brew cleanup mongodb

Well, I just did

brew install mongodb

and followed the instructions that were output to the STDOUT after it finished installing, and that seems to have worked just fine. I guess it kinda works just like make install and overwrites (upgrades) a previous install.


You can't use brew install to upgrade an installed formula. If you want upgrade all of outdated formulas, you can use the command below.

brew outdated | xargs brew upgrade