brew leaves: show installed formulae that are not dependencies of another installed formula. ## dump all packages and casks: https://stackoverflow.com/a/67259187/69938 brew bundle dump --file - | grep '^brew\|^cask' | sed 's/.* "\(.*\)".*$/\1/' ## installed packages in tree brew deps --installed --tree