i trying learn cabal, , have tested several own little projects, want clean them up.
basically, if working without sandbox, workflow is:
- run
cabal init - edit
src/mylib.hs, , editmylibname.cabalfile - run
cabal build - run
cabal repl, test code - run
cabal install
now, see own project:
- installed
~/.cabal/lib/x86-64-linux-ghc-7.10.1 - registered in
~/.ghc/package.conf.d
i can write import mylib in other haskell source code, think package installed.
then want uninstall package, package meaningless experiment code.
i read this article, says that:
there no "cabal uninstall" command. can unregister packages ghc-pkg:
ghc-pkg unregister
so run
ghc-pkg unregister mylibname now, seems package unregistered in ~/ghc/package.conf.d, however, there still compiled library in ~/.cabal/lib/x86-64-linux-ghc-7.10.1.
so, how completly remove project, rm -rf library in ~/.cabal?
you can delete files packages directory. however, reason no command provided there's in general no guarantee may not have linked against them elsewhere, , such deletions may cause breakages. said, there's tool goes , deletion if really want it.
http://hackage.haskell.org/package/cabal-uninstall
and there's tool bit more functionality lets figure out packages have no reverse deps, @ least no other packages break:
Comments
Post a Comment