Skip to content

Instantly share code, notes, and snippets.

@eppfel
Created August 30, 2016 14:23
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 eppfel/6fef7c3c907268cef93f1d0358c6ce21 to your computer and use it in GitHub Desktop.
Save eppfel/6fef7c3c907268cef93f1d0358c6ce21 to your computer and use it in GitHub Desktop.
I had problems uninstalling Homebrew Casks due to old metadata
for f in /usr/local/Caskroom/*/* ; do
package="$(basename "$(dirname "${f}")")"
version="$(basename "${f}")"
test -e "/usr/local/Caskroom/${package}/.metadata/${version}" || rm -rf "/usr/local/Caskroom/${package}/${version}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment