Skip to content

Instantly share code, notes, and snippets.

@g2g
Forked from ArgonQQ/README.md
Last active November 29, 2024 09:29
Show Gist options
  • Save g2g/39626842738ff82fe66c66bda3835796 to your computer and use it in GitHub Desktop.
Save g2g/39626842738ff82fe66c66bda3835796 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