Cabal - how do I remove a package?

As it says in the subject, how do I remove a package that I installed (with the --user flag) via cabal? Come to that, how do I list the packages I've installed via cabal? cabal list --installed includes all the GHC standard library (which I didn't install) and it doesn't seem to support a --user flag to list per-user installed packages. FWIW, I'm on Windows 7. Thanks, Paul.

you want: ghc-pkg unregister [package name] and ghc-pkg list /jve On Tue, Oct 6, 2009 at 3:52 PM, Paul Moore
As it says in the subject, how do I remove a package that I installed (with the --user flag) via cabal?
Come to that, how do I list the packages I've installed via cabal? cabal list --installed includes all the GHC standard library (which I didn't install) and it doesn't seem to support a --user flag to list per-user installed packages.
FWIW, I'm on Windows 7.
Thanks, Paul. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

2009/10/6 John Van Enk
you want:
ghc-pkg unregister [package name]
and
ghc-pkg list
Thanks. I wouldn't have found that by myself. Unfortunately, having issued ghc-pkg unregister mersenne-random-1.0 I still see the code present:
dir C:\Users\Gustav\AppData\Roaming\cabal\mersenne-random-1.0\ghc-6.10.4
Volume in drive C is OS Serial number is 8442:99ea Directory of C:\Users\Gustav\AppData\Roaming\cabal\mersenne-random-1.0\ghc-6.10.4\* 05/10/2009 21:06 <DIR> . 05/10/2009 21:06 <DIR> .. 05/10/2009 21:06 <DIR> include 05/10/2009 21:06 <DIR> System 05/10/2009 21:06 44,350 HSmersenne-random-1.0.o 05/10/2009 21:06 66,762 libHSmersenne-random-1.0.a Looks like ghc-pkg unregister just does precisely that - unregisters the package but doesn't remove it. Can I even persuage cabal/ghc-pkg to list all the files and directories created by the install so I can remove them by hand? Paul.

Are you actually trying to remove the bits from the hard drive, or is that something to fix a different problem you're having. If it's a different problem, perhaps you could ask that as well? On Tue, Oct 6, 2009 at 4:04 PM, Paul Moore
2009/10/6 John Van Enk
: you want:
ghc-pkg unregister [package name]
and
ghc-pkg list
Thanks. I wouldn't have found that by myself.
Unfortunately, having issued
ghc-pkg unregister mersenne-random-1.0
I still see the code present:
dir C:\Users\Gustav\AppData\Roaming\cabal\mersenne-random-1.0\ghc-6.10.4
Volume in drive C is OS Serial number is 8442:99ea Directory of C:\Users\Gustav\AppData\Roaming\cabal\mersenne-random-1.0\ghc-6.10.4\*
05/10/2009 21:06 <DIR> . 05/10/2009 21:06 <DIR> .. 05/10/2009 21:06 <DIR> include 05/10/2009 21:06 <DIR> System 05/10/2009 21:06 44,350 HSmersenne-random-1.0.o 05/10/2009 21:06 66,762 libHSmersenne-random-1.0.a
Looks like ghc-pkg unregister just does precisely that - unregisters the package but doesn't remove it. Can I even persuage cabal/ghc-pkg to list all the files and directories created by the install so I can remove them by hand?
Paul.

2009/10/6 John Van Enk
Are you actually trying to remove the bits from the hard drive, or is that something to fix a different problem you're having. If it's a different problem, perhaps you could ask that as well?
Yes, I'm trying to remove the bits from the disk. I did a cabal install --user mersenne-random and I now want to get rid of it. If you're asking why I don't just leave the files there as they aren't doing any harm, let's just say I don't want to leave clutter round on my disk. Places like the APPDATA folder accumulate enough junk on their own without stuff getting left there just because an application doesn't clean up after itself properly (that's not a dig at Haskell, loads of programs do that :-() Paul.

2009/10/6 Paul Moore
2009/10/6 John Van Enk
: Are you actually trying to remove the bits from the hard drive, or is that something to fix a different problem you're having. If it's a different problem, perhaps you could ask that as well?
Yes, I'm trying to remove the bits from the disk.
At the moment cabal doesn't keep track of installed files, so you need to delete them manually. Peter

2009/10/6 Peter Robinson
2009/10/6 Paul Moore
: 2009/10/6 John Van Enk
: Are you actually trying to remove the bits from the hard drive, or is that something to fix a different problem you're having. If it's a different problem, perhaps you could ask that as well?
Yes, I'm trying to remove the bits from the disk.
At the moment cabal doesn't keep track of installed files, so you need to delete them manually.
OK, thanks. And I assume that when you say it doesn't keep track, that means I can't get cabal to tell me what it created. Ah, well. I can work it out, so that's OK. Paul.
participants (3)
-
John Van Enk
-
Paul Moore
-
Peter Robinson