Everywhere that GHC/Haskell Platform installs

amindfv picture amindfv · Jul 30, 2011 · Viewed 10.3k times · Source

Assume I want to completely reinstall GHC/HP. I want to (as much for superstition as anything) delete anything and everything from previous installs. What do I actually need to delete (and where)?

Edit: I'm on OSX, but I'm more curious if this information is available in general, for all systems.

Edit2: So far we have:

OSX:
/Library/Frameworks/GHC.framework/
~/.cabal/
/usr/bin/ -- symlinks

I'll add to that (based on "prefix" defined here: http://www.vex.net/~trebla/haskell/sicp.xhtml#storage):
prefix/lib/
prefix/share/
prefix/bin/
prefix/share/doc/
/usr (/local) /lib/[ghc-version]
/usr (/local) /share/doc/ghc/html/libraries/ -- documentation
/usr (/local) /share/doc/ghc/
/usr (/local) /bin
/var/lib/[ghc-version]
/etc/[ghc-version]
~/.ghc/

Edit 3:
OS X:
~/Library/Haskell

Linux:
??

Windows:
??

Answer

pithyless picture pithyless · Aug 9, 2011

Had to remove Haskell Platform on OS X recently. Most are cleaned up via Uninstaller:

sudo /Library/Frameworks/GHC.framework/Versions/Current/Tools/Uninstaller

These have to be cleaned up manually:

rm -r ~/.cabal
rm -r ~/.ghc
rm -r ~/Library/Haskell

Alternatively, as documented in

/Library/Haskell/doc/start.html

there is now a custom uninstall command with options,

/Library/Haskell/bin/uninstall-hs

In general, one can document the files created by any activity (installer, ...) by bracketing the activity in a work directory with

echo >timestamp
[activity]
sudo find -x / -newer timestamp -print >snapshot.txt