Skip to content

Instantly share code, notes, and snippets.

@liushooter
Forked from gatlin/uninstall-haskell-osx.sh
Last active November 15, 2017 01:49
Show Gist options
  • Save liushooter/05d0c86fe4c8a2f3cd9317da73f5aca1 to your computer and use it in GitHub Desktop.
Save liushooter/05d0c86fe4c8a2f3cd9317da73f5aca1 to your computer and use it in GitHub Desktop.
Uninstall Haskell from Mac OS X
#!/bin/bash
# source: http://www.haskell.org/pipermail/haskell-cafe/2011-March/090170.html
sudo rm -rf /Library/Frameworks/GHC.framework
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
sudo rm -rf /Library/Haskell
rm -rf .cabal
rm -rf .ghc
rm -rf ~/Library/Haskell
find /usr/bin /usr/local/bin -type l | \
xargs -If sh -c '/bin/echo -n f /; readlink f' | \
egrep '//Library/(Haskell|Frameworks/(GHC|HaskellPlatform).framework)' | \
cut -f 1 -d ' ' > /tmp/hs-bin-links
# review /tmp/hs-links
sudo rm `cat /tmp/hs-bin-links`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment