Is there a way or a special command in brew to freeze the installed packages into a requirements.txt file, just like you can with pip in python? And then to quickly reinstall them all from that file?
The recommended approach is to use a requirements. txt file (readthedocs.org) that contains a list of commands for pip that installs the required versions of dependent packages. The most common command is pip freeze > requirements. txt , which records an environment's current package list into requirements.
pip freeze is a very useful command, because it tells you which modules you've installed with pip install and the versions of these modules that you are currently have installed on your computer. In Python, there's a lot of things that may be incompatible, such as certain modules being incompatible with other modules.
You just need to delete the venv folder and initialize new one.
Use Homebrew-bundle; it’s designed for that.
# generate a Brewfile
$ brew bundle dump
$ ls
Brewfile
# check everything is installed
$ brew bundle check
The Brewfile's dependencies are satisfied.
It works with both local formulae files and a global one for the current user. It allows you to install everything specified in a Brewfile
(that’s the default you can use whatever name you like) as well as uninstall what’s installed but not listed in the file. The file not only list installed formulae but also installed taps (e.g. homebrew/versions
, homebrew/php
, etc) and casks (if you use Homebrew Cask).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With