Skip to content

Instantly share code, notes, and snippets.

@craiga
Last active April 23, 2018 15:05
Show Gist options
  • Save craiga/8976c4def184a75d41dc8a2d7a046bf2 to your computer and use it in GitHub Desktop.
Save craiga/8976c4def184a75d41dc8a2d7a046bf2 to your computer and use it in GitHub Desktop.
An attempt at finding everything installed on my Mac. Required for a client's PCI compliance audit.
#!/usr/bin/env bash
echo "Applications manually installed by `whoami`:"
find /Applications -maxdepth 1 -user `whoami` | sed 's#/Applications/##'
echo ""
echo "Applications downloaded from App Store:"
# Adapted from http://osxdaily.com/2013/09/28/list-mac-app-store-apps-terminal/
find /Applications -path '*Contents/_MASReceipt/receipt' -maxdepth 4 -print | sed 's#.app/Contents/_MASReceipt/receipt#.app#g; s#/Applications/##'
echo ""
echo "Packages managed by brew:"
brew list
echo ""
echo "Software checked out from git:"
find / -name ".git" | sed 's/\.git//' | while read dir; do cd $dir && git remote get-url origin; done
echo ""
echo "Packages managed by pip (`python2 --version`):"
pip2 list
echo ""
echo "Packages managed by pip (`python3 --version`):"
pip3 list
echo ""
echo "Packages in Python virtual environments:"
source /usr/local/bin/virtualenvwrapper.sh
allvirtualenv pip list
echo ""
echo "Packages managed by gem:"
gem list
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment