[Haskell-cafe] uninstalling ghc-8.0.1-x86_64 installed through "install-haskell-platform.sh"

Patrice plevexier at gmail.com
Mon Jun 6 17:39:29 UTC 2016


Thank you Gary, I should have done that myself, that's why I hoped for a 1
liner :)

What I actually did was to remove that directory
usr/local/haskell/ghc-8.0.1-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.

Pat

On Mon, Jun 6, 2016 at 12:05 PM, Gary Fixler <gfixler at gmail.com> wrote:

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


More information about the Haskell-Cafe mailing list