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.leavesbrew 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