Last active
January 9, 2021 16:49
-
-
Save ussserrr/fc62f54278d50d24940646599b8b89aa to your computer and use it in GitHub Desktop.
List installed Homebrew packages that are not being dependencies of any other
This file contains hidden or 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/sh | |
echo "Orphaned packages:\n" | |
for BREW_PKG in $(brew list --formula -1) | |
do | |
BREW_USES_PKG=$(brew uses $BREW_PKG --installed --recursive) | |
if [ -z "$BREW_USES_PKG" ] | |
then | |
echo "$BREW_PKG" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment