Skip to content

Instantly share code, notes, and snippets.

@phinze
Created August 6, 2013 23:44
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 phinze/6169914 to your computer and use it in GitHub Desktop.
Save phinze/6169914 to your computer and use it in GitHub Desktop.
Clean Casks from homebrew-casks that were improperly linked as homebrew formula during a brew update. This happened for a spell due to a bug in homebrew that is now fixed, but some people have extra links lying around from when the bug was in the wild. This has been tested and cleans up any symlinks that shouldn't be there.
find $(brew --prefix)/Library/Formula -type l | for symlink in $(cat -); do readlink $symlink | grep phinze-cask | grep -v brew-cask > /dev/null && rm -v $symlink; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment