How to freeze brew requirements like pip?

Is there a way or special command in brew to freeze installed packages in the requirements.txt file, as you can with pip in python? And then quickly reinstall them from this file?

+4
source share
2 answers

Change the answer to the question without freezing the version.

brew list >brew.txt
<brew.txt xargs brew install

-

Homebrew is designed to provide you with the latest packages. Freezing versions is not its strong point.

, . brew list --versions ( , , ). brew tap homebrew/versions .

, . , node, 5.5.0. brew install homebrew/versions/node4-lts. brew list --versions?

node 5.5.0
node4-lts 4.3.1

, , , ( , , , Homebrew), homebrew/versions , 4 -> node4-lts. , , homebrew/versions. brew info, , - .

+4

Homebrew-bundle; .

# generate a Brewfile
$ brew bundle dump
$ ls
Brewfile

# check everything is installed
$ brew bundle check
The Brewfile dependencies are satisfied.

, . , Brewfile ( ), , . , (, homebrew/versions, homebrew/php ..) ( Homebrew Cask).

+7

Source: https://habr.com/ru/post/1629825/


All Articles