andreasabel / cabal-clean

Remove outdated compilation artefacts left by cabal v2-build
https://hackage.haskell.org/package/cabal-clean
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

how about ~/.cabal/store/ ? #5

Open juhp opened 8 months ago

juhp commented 8 months ago

Have you considered extending to allow also cleaning ~/.cabal/store/ ?

Or is there any other tool for that - other than a filemanager (but it can be error-prone)?

andreasabel commented 8 months ago

The problem with removing from ˜/.cabal/store is that one might have installed binaries using cabal which point back to the store. Deleting from the store will make these executables dysfunctional.

There were rumors about a GSoC project to implement garbage collection for cabal build products, but I don't know whether it has happened or will happen. CC @fgaz

fgaz commented 8 months ago

The upstream ticket is https://github.com/haskell/cabal/issues/3333.

In the end the GSoC project wasn't picked up.

There are a few third party tools, such as https://github.com/phadej/cabal-extras/tree/master/cabal-store-gc