Skip to content

Instantly share code, notes, and snippets.

@shov
Created April 1, 2019 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shov/f5a18d1790423ecb71a6a94bcdfa50ad to your computer and use it in GitHub Desktop.
Save shov/f5a18d1790423ecb71a6a94bcdfa50ad to your computer and use it in GitHub Desktop.
Reborn brew packages after migration
#!/bin/bash
brew list -1 > brew.txt \ # list out all installed packages
&& brew list -1 | xargs brew rm --force \ # remove all installed packages
&& brew install $(cat brew.txt | tr '\n' ' ') \ # install all previously installed packages
&& rm brew.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment