|||

Using Brew Bundle to Backup and Restore Mac App Store and Brew Apps

Brew Bundle

Per the Bundle github README, Bundler is a [1] Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store(MAS) and Whalebrew.”

Brew bundle creates a text file called Brewfile listing all the currently installed applications managed via Brew and the Mac App Store. This Brewfile can be used as a backup and gives you the ability to restore applications when reinstalling macOS or setting up a new environment.

The screenshots below are from the Bundle Brew Documentation page. [2]

Bundle Installation

The first time the command, brew bundle, is run it will install, if not already.

brew bundle

Bundle Backup to Brewfile

To create the Brewfile use the command, brew bundle dump, and a text file with all the Brew, Mac App Store apps, and their dependancies will be created in the current directory.

brew bundle dump

The below Brewfile contains all the installed Brew and MAS apps

Bundle Check and List

Using command, brew bundle check, will check to see if all dependancies are installed from the Brewfile. The command, brew bundle list, will list all the dependancies present in a Brewfile.

brew bundle list
brew bundle check 

Bundle Restore from Brewfile

The command, brew bundle install, will use the Brewfile in the current directory and install any application listed, but not currently installed.

In this example the brew cask application atom was added to the dumped Brewfile, and when the install command is run it installed atom.

brew bundle install

Bundle Cleanup

Using the command, brew bundle cleanup, will remove any apps installed, but not listed in the Brewfile.

In the below screenshots atom was removed from the Brewfile. When the command, brew bundle cleanup, the output shows what will be uninstalled. To actually uninstall the apps, use the command brew bundle cleanup –force.

brew bundle cleanup
brew bundle cleanup --force

Resources:

  1. brew bundle https://github.com/Homebrew/homebrew-bundle.git

  2. brew documentation bundle subcommand https://docs.brew.sh/Manpage#bundle-subcommand

Up next Update macOS with an all in one alias Free Git eBook
Latest posts Change Synology NAS Password from the CLI Free Git eBook Using Brew Bundle to Backup and Restore Mac App Store and Brew Apps Update macOS with an all in one alias Mac App Store Command Line Interface Update macOS with softwareupdate command Markdown Crash Course Video What’s New with Fusion and Workstation [HCP1833] File IO in Python Overview of vSphere 7 Video What is ISO? Migrating Website HTML details Tag Microsoft RD Client iOS App Create VMware ESXi USB Install Media Intel NUC Lab Hosts Hardware Setup Installing Microsoft SQL 2016, and Management Studio Deploy VMware vCenter Appliance (VCSA) Installing the First Two Domain Controllers in the VMware ESXi 6.7 Lab Environment Macchanger Utility, and Usage Install a Kali Linux VM in a VMware ESXi 6.7 Environment Install Ubuntu 18.04 Virtual Machine in a VMware ESXi 6.7 Environment Install xRDP on Ubuntu 18.04 Install Chromium on Ubuntu 18.04 Install OpenSSH on Ubuntu 18.04 Install VMware Workstation 14 on Ubuntu 18.04 Nested ESXi server Laboratorium Rattus The Animal Within Who is Veeam? RSAC OnDemand Videos Create a Windows 10 Sandbox VM on VMware Workstation 14