Skip to content

Instantly share code, notes, and snippets.

@kaeff
Created March 2, 2017 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaeff/6b332c9a642cf92fd951db92592880e0 to your computer and use it in GitHub Desktop.
Save kaeff/6b332c9a642cf92fd951db92592880e0 to your computer and use it in GitHub Desktop.
Utility to find apps which are missing from `brew list` although installed
#!/bin/bash
brew cask list | sed 's/ +/\n/g' | sort > apps-cask.txt
ls -l /Applications | cut -c 55- | grep -v '\->' | sed 's/ /-/g' | sed 's/\.app//g' | awk '{print tolower($0)}' | sort > apps.txt
comm -23 apps.txt apps-cask.txt > apps-not-installed-by-brew.txt
ls /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks | sed 's/\.rb//' > all-casks.txt
comm -12 apps-not-installed-by-brew.txt all-casks.txt > apps-missing-from-brew.txt
cat apps-missing-from-brew.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment