Last active
August 17, 2018 14:01
-
-
Save ntessore/b98fc9f7aedf1ea9a345 to your computer and use it in GitHub Desktop.
homebrew: list "unneccessary" installed packages (i.e. not needed by any other package)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### | |
# list "unneccessary" installed packages (i.e. not needed by any other package) | |
# | |
# save: $ curl -Lo /usr/local/bin/brew-unnecessary https://git.io/brew-unnecessary | |
# chmod: $ chmod +x /usr/local/bin/brew-unnecessary | |
# run: $ brew unnecessary | |
#### | |
for pkg in $(brew list); do | |
if [ -z "$(HOMEBREW_NO_AUTO_UPDATE=1 brew uses --installed --skip-build $pkg 2> /dev/null)" ]; then | |
echo $pkg | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment