Kamilski81
Kamilski81

Reputation: 15107

How do i point to an older keg with homebrew?

I have the following:

kamil:~/Sites/sc-1.9.3@sc: (develop)$ brew info mongo
mongodb: stable 2.2.0-x86_64
http://www.mongodb.org/
/usr/local/Cellar/mongodb/2.0.1-x86_64 (18 files, 120M)
/usr/local/Cellar/mongodb/2.2.0-x86_64 (20 files, 170M) *

I want to run 2.0.1 again, but everything points to newest version:

    kamilski81:~/Sites:ruby-1.9.3:$ ll /usr/local/bin/mongod
    kamilski81  wheel  41 Sep 22 13:55 /usr/local/bin/mongod -> ../Cellar/mongodb/2.2.0-x86_64/bin/mongod

Is there an eloguent way to point to the older version of mongo?

Upvotes: 1

Views: 80

Answers (1)

CharlesB
CharlesB

Reputation: 90276

Use the brew switch:

$ brew switch mongo 2.0.1

Upvotes: 2

Related Questions