How to migrate existing brews from /usr/local to new /usr/local/Homebrew?


#1

I read the 1.0.0 blog entry and think the move is a good one, but … how do I move my existing brews without uninstalling and re-installing everything? I couldn’t find any instructions for this. Hope there’s a shortcut otherwise its going to be a long night.


(Zhiming Wang) #2

This should happen automatically when you brew update, unless you have custom paths (which you don’t seem to).


(Zhiming Wang) #3

To be clear, only the Homebrew/brew repository is moved to /usr/local/Homebrew. Formulae you install continue to live in /usr/local/Cellar and be linked into /usr/local and that won’t change in the foreseeable future.


#4

Hmmm. I’ve checked the version - definitely 1.0.0. I’ve run brew update and brew upgrade (a couple of times), yet there’s still no such directory /usr/local/Homebrew

$ brew --version
Homebrew 1.0.0 (git revision d5b6e; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 1cb2; last commit 2016-09-21)
mike@Atlas ~
$ brew update
Updated 1 tap (homebrew/core).
==> Updated Formulae
gupnp
$ brew upgrade
$ ls /usr/local
Caskroom	bin		include		libexec		sbin		squid
MacGPG2		etc		lib		opt		share		var
$

#5

For what its worth:
$ brew config
HOMEBREW_VERSION: 1.0.0
ORIGIN: https ://github.com/Homebrew/brew.git
HEAD: d5b6ecfc5078041ddf5f61b259c57f81d5c50fcc
Last commit: 4 hours ago
Core tap ORIGIN: https ://github.com/Homebrew/homebrew-core
Core tap HEAD: 193811f15d210d2509e29e8664b5a164d7d15fb6
Core tap last commit: 33 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /homebrew
HOMEBREW_CELLAR: /homebrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https ://homebrew.bintray.com
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.8.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12-x86_64
Xcode: 8.0
CLT: N/A
X11: 2.7.9 => /opt/X11
$


(Zhiming Wang) #6

Your Homebrew repository is already in a non-standard location than /usr/local, so there’s nothing to be migrated.


#7

Ahhh. Thank you. I missed that. Must have done that ages ago.