Skip to content

Instantly share code, notes, and snippets.

@ChristopherA
Created February 18, 2019 07:54
Show Gist options
  • Save ChristopherA/238a2edda001164d93bea8f78f0ebc2d to your computer and use it in GitHub Desktop.
Save ChristopherA/238a2edda001164d93bea8f78f0ebc2d to your computer and use it in GitHub Desktop.
Clean Brewfile of Accidental Leaves

brew bundle dump will leave out leaf dependencies unless you accidently added them specifically. This script will clean them out of the Brewfile

cat Brewfile | egrep "$(brew leaves | xargs printf '"%s"|')tap|cask" > Brewfile.leaves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment