Did you know that you can back up your Brewfile? It’s a great way to keep track of all the software you’ve installed on your Linux or Mac system.

Wait, Homebrew on Linux? Absolutely! It’s a fantastic package manager for Linux as well. You can use it to manage your CLI tools and maintain a clean, organized system.


Back Up Your Brewfile

Here’s how to back up your Brewfile:

  1. Open a terminal
  2. Run brew bundle dump --file=~/Brewfile --describe
  • --file specifies the location of the Brewfile to be created.
  • --describe adds a comment to each line in the Brewfile with a description of the formula, unless the dependency does not have a description. This option is enabled by default if HOMEBREW_BUNDLE_DUMP_DESCRIBE is set.

You can now commit this file to your dotfiles repository or store it in a cloud storage solution to keep it in sync across all your machines.

Restore your Brewfile

To restore your Brewfile on a new machine, you can run:

brew bundle --file=~/Brewfile # `--file` specifies the location of the Brewfile

This will install all the software listed in your Brewfile.

Linuxbrew? Really? Why?

Linuxbrew, the Linux port of Homebrew, is a package manager that simplifies the installation of software on Linux. It allows users to install programs without requiring root permissions, making it ideal for environments where administrative access is limited. With Linuxbrew, software is installed in the user’s home directory, ensuring a clean and customizable setup. It also handles dependencies automatically and offers a vast collection of up-to-date packages, making it a convenient choice for developers, system admins, and hobbyists.

  • No Root Permissions Needed: Install software without requiring administrative access.
  • User-Friendly: Easy to use, with commands that are straightforward and consistent.
  • Customizable Setup: Installs programs in the user’s home directory, avoiding system-wide changes.
  • Automatic Dependency Management: Handles dependencies seamlessly, saving time and effort.
  • Extensive Package Collection: Provides access to a large repository of up-to-date software.
  • Cross-Platform Consistency: Familiar to users of macOS Homebrew, enabling an easier transition.
  • Perfect for Shared Environments: Works well on systems where root access is restricted.