74

I have homebrew installed long before the OS is upgraded a few times to 10.12.3. Now that

$ brew --version
Homebrew 0.9.9 (git revision 080c; last commit 2016-08-11)
Homebrew/homebrew-core (git revision b163b; last commit 2016-08-10)

How to properly upgrade to newer version, say 1.1?

$ brew upgrade 

didn't work.

bmike
  • 235,889
qazwsx
  • 2,561

5 Answers5

77

To update homebrew itself, use:

brew update

To upgrade all packages installed using homebrew, then you have to use brew upgrade. You can check this FAQ from brew website for more details.

mklement0
  • 1,065
hd84335
  • 913
20

The right way to solve this is to enter:

$ cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update

Found at http://discourse.brew.sh/t/how-to-upgrade-brew-stuck-on-0-9-9/33.

klanomath
  • 66,391
  • 9
  • 130
  • 201
qazwsx
  • 2,561
13

As a habit, I run this command once a week:

brew update && brew upgrade && brew cleanup

It updates brew itself, casks and related packages then clears old package's unneeded files. Here is the result after running twice:

Already up-to-date
user3439894
  • 58,676
2

When you want to update Homebrew, use brew update. After running brew update, you may have outdated formulae installed, which is where brew upgrade is necessary.

$ git -C
Takes an existing commit object, and reuses the log messages and the authorship information (including the timestamp) when creating a commit.

/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
This is the path to the homebrew-core folder on a computer.

fetch
Downloads objects and references from another repository.

--unshallow
This is a git fetch option. If the source repository is complete, it converts a shallow repository to a complete one, removing all the limitations imposed by shallow repositories.

brew update
Updates the Homebrew

Megg
  • 21
0

Use these commands

$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow  
$ brew update
grg
  • 201,078
anony
  • 9