Skip to content

Instantly share code, notes, and snippets.

@thinktainer
Forked from ArgonQQ/README.md
Created December 8, 2021 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinktainer/116abc6c24aea67c2e5055ed1632e14d to your computer and use it in GitHub Desktop.
Save thinktainer/116abc6c24aea67c2e5055ed1632e14d to your computer and use it in GitHub Desktop.
Brew install specific version / Locally freeze version

Brew install specific version / Locally freeze version

# Please define variables
packageName=<packageName>
packageVersion=<packageVersion>

# Create a new tab
brew tap-new local/$packageName

# Extract into local tap
brew extract --version=$packageVersion $packageName local/$packageName

# Verify packages is present
brew search $packageName@

# Run brew install@version as usual
brew install local/$packageName/$packageName@$packageVersion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment