Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore formula on brew upgrade

Tags:

homebrew

I want to do a brew upgrade and tell homebrew do not upgrade the erlang formula since the latest one does not work on my system.

Is it possible do do something like homebrew upgrade --skip erlang?

like image 384
pangratz Avatar asked Apr 10 '12 17:04

pangratz


People also ask

What is the difference between brew update and upgrade?

brew update and upgrade brew update updates the above downloaded git repository with the latest code from GitHub. brew upgrade updates the actual packages to match the versions in the updated local git repository. Let me know if this not helpful in the comments and I will update the article as suggested.

How long does it take to update homebrew?

From 20 minutes to an hour. The devs are aware.

What is keg only?

What does “keg-only” mean? It means the formula is installed only into the Cellar and is not linked into the default prefix. This means most tools will not find it. You can see why a formula was installed as keg-only, and instructions for including it in your PATH , by running brew info <formula> .


1 Answers

I finally found an answer: since commit 85eb73ce there is a pin subcommand available. So ignoring a formula on brew upgrade is as simple as pinning it via brew pin <formula>. To un-pin it, simply invoke brew unpin <formula>.

It is worth noting that brew upgrade <formula> will still update the formula regardless of whether or not it is pinned.

Caveat: This answer is no longer valid for recent versions of Homebrew, since brew pin has been removed.

like image 109
pangratz Avatar answered Nov 13 '22 21:11

pangratz