@kindaro some clarifications:
This was partially true for package databases, but environments are just a set of “pointers” to actual packages in the cabal store, so deleting and recreating them is very quick, and you don’t have to delete your cache.
There is some documentation about them at the ghc side: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/packages.html#package-environments
The install --lib
docs explain the practical usage with current cabal: https://cabal.readthedocs.io/en/3.4/cabal-commands.html#cabal-v2-install
cabal env
will of course have its own section
With cabal env
, there will be a way to remove a package from an environment (the prototype linked in the issue can already do this)
Or, if you mean actually freeing up the space from the cache, there is #3333, but it’s lower priority