<div dir="ltr">Thank you Gary, I should have done that myself, that's why I hoped for a 1 liner :)<div><br></div><div>What I actually did was to remove that directory <span style="font-size:12.8px">usr/local/haskell/ghc-8.0.1-</span><span style="font-size:12.8px">x86_64/, and installed haskell-platform with apt-get, which I believe overwrote all the sym links. After that, I just apt-get remove haskell-platform and everything seems to be clean.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Pat</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 12:05 PM, Gary Fixler <span dir="ltr"><<a href="mailto:gfixler@gmail.com" target="_blank">gfixler@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I grabbed the "Minimal (64 bit)" tar (YMMV if you got the Full or<br>
32-bit versions) and had a look inside. It contains just the .sh file<br>
and a .gz archive. The contents of the script are small; beyond a few<br>
tests, it basically just does a `tar -C /` on the .gz file, which just<br>
unpacks all the files in there to their original directories under<br>
root, and then calls a setup script that unpacks with/into that big<br>
list of files.<br>
<br>
Listing the contents of the .gz, every single file path (of 7,377)<br>
begins with "usr/local/haskell/ghc-8.0.1-x86_64/", so everything<br>
unpacked should be contained in there. The follow-up script that gets<br>
called is in there under .../bin/activate-hs. Things get a bit more<br>
complex in that script. It can be called with a few options, but isn't<br>
called with any from the initial install script, so the following few<br>
things then happen (after some simple, script-internal, setup stuff):<br>
<br>
1) these symlink calls fire off, linking bin, man, and doc files from<br>
the /usr/local/haskell/ghc*/ dir created above to the same locations<br>
in the default directory (/usr/local/, as set at the top of the<br>
script), and note that the script cleanly exits if it doesn't find bin<br>
and share in the default dir (i.e. if you don't have /usr/local/bin<br>
and /usr/local/share for some reason):<br>
<br>
    symLinkInto "$prefix/bin" "$ghcRoot"/bin/*<br>
    symLinkInto "$prefix/share/man/man1" "$ghcRoot"/share/man/man1/*<br>
    symLinkInto "$prefix/share/doc" "$ghcRoot"/share/doc/ghc<br>
<br>
The files in the bin dir that should have been copied from the<br>
aforementioned `tar -C /`, which would alll get linked over are:<br>
<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/hp2ps<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghc-8.0.1<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/runghc<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/happy<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/activate-hs<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/HsColour<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghc-pkg-8.0.1<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/hpc<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/runhaskell<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/runghc-8.0.1<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/hsc2hs<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghci<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/alex<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/cabal<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/stack<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/haddock<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghci-8.0.1<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghc-pkg<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/haddock-ghc-8.0.1<br>
usr/local/haskell/ghc-8.0.1-x86_64/bin/ghc<br>
<br>
Likewise, the man1 files linked over are just this one:<br>
<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/man/man1/ghc.1<br>
<br>
And finally, the [large number of] doc files... well, I'm not sure how<br>
this works, as it's symlinking from"$ghcRoot"/share/doc/ghc/ in the<br>
call above, but the files are all contained in<br>
"$ghcRoot"/share/doc/ghc-8.0.1/ in the .gz file. I'm wondering if this<br>
is a bug in the installation (and why I never seemed to have any local<br>
docs for ghc):<br>
<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/users_guide/<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/users_guide/phases.html<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/users_guide/_images/<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/users_guide/_images/prof_scc.svg<br>
usr/local/haskell/ghc-8.0.1-x86_64/share/doc/ghc-8.0.1/html/users_guide/ghc.html<br>
...snipped here, as there are 3,633 in all, but all under .../ghc-8.0.1/...<br>
<br>
2) packages then get registered via:<br>
<br>
for conf in "$ghcRoot"/etc/registrations/*<br>
do<br>
    run "$ghcRoot"/bin/ghc-pkg register --verbose=0 --force $conf 2>/dev/null<br>
done<br>
<br>
The only thing I see in the .gz for registrations is:<br>
<br>
usr/local/haskell/ghc-8.0.1-x86_64/etc/registrations/hscolour-1.24<br>
<br>
I don't know what unregistering packages entails, sorry.<br>
<br>
3) finally, some reporting on what it did<br>
<br>
<br>
I think that's it. If you installed the full version, you may have<br>
much more than this, but maybe this will serve as a guide to figuring<br>
that out. It's not as messy as I guessed, but I don't know that<br>
there's any command or one-liner that cleanly removes it all.<br>
<br>
-g<br>
<div><div class="h5"><br>
<br>
<br>
On Mon, Jun 6, 2016 at 8:03 AM, Patrice <<a href="mailto:plevexier@gmail.com">plevexier@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> How can I uninstall cleanly ghc-8.0.1-x86_64 that I installed using the<br>
> script install-haskell-platform.sh (found on <a href="http://haskell.org" rel="noreferrer" target="_blank">haskell.org</a> website under<br>
> Generic Linux). I'm on ubuntu Trusty.<br>
><br>
> Thanks,<br>
><br>
> Pat<br>
><br>
</div></div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
><br>
</blockquote></div><br></div>