X-Git-Url: https://git.cyclocoop.org/?p=tool%2Fhledger.git;a=blobdiff_plain;f=script%2Fghc-pkg-reset;fp=script%2Fghc-pkg-reset;h=38707060ce4867b2d97edda03689a70b4257b6da;hp=0000000000000000000000000000000000000000;hb=707b0a621cd3c97d5d7e22e855272b3f865a2d56;hpb=30e9b83c521f5149836e1ef0b544676370721efe diff --git a/script/ghc-pkg-reset b/script/ghc-pkg-reset new file mode 100755 index 0000000..3870706 --- /dev/null +++ b/script/ghc-pkg-reset @@ -0,0 +1,12 @@ +#!/bin/sh -eux + +# DESCRIPTION: remove all installed GHC/cabal packages, +# leaving ~/.cabal binaries and docs in place. +# When all else fails, use this to get out of dependency hell and start over. +read -p 'erasing all your user ghc and cabal packages - are you sure (y/n) ? ' ans +test x$ans == xy && ( \ + echo 'erasing directories under ~/.ghc'; rm -rf `find ~/.ghc -maxdepth 1 -type d`; \ + echo 'erasing ~/.cabal/lib'; rm -rf ~/.cabal/lib; \ + # echo 'erasing ~/.cabal/packages'; rm -rf ~/.cabal/packages; \ + # echo 'erasing ~/.cabal/share'; rm -rf ~/.cabal/share; \ + )