61

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
  • 226,393
  • 78
  • 398
  • 871
qazwsx
  • 2,231
  • 6
  • 29
  • 36

5 Answers5

65

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
  • 995
  • 12
  • 29
hd84335
  • 793
  • 1
  • 6
  • 9
18

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
  • 64,996
  • 9
  • 126
  • 195
qazwsx
  • 2,231
  • 6
  • 29
  • 36
8

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
  • 55,813
  • 9
  • 101
  • 125
Sinan Eldem
  • 181
  • 1
  • 3
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
  • 2
0

Use these commands

$ git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow  
$ brew update
grg
  • 192,762
  • 43
  • 337
  • 460
anony
  • 9
  • 1