[Nix-dev] Remove packages
Eelco Dolstra
eelco at cs.uu.nl
Fri May 20 02:00:13 CEST 2005
Hi,
On 18-mei-05, at 13:18, olivier wrote:
> I would like to know if there is some way to remove packages in
> /nix/store. If the build fails, it will not be rebuilt. It is not
> practical if this is a nix configuration error, and not a package
> error (a rm -rf doesn't clean the database).
>
> I only know nix-store --gc, but it takes too much time to re-download
> and re-build all packages.
There is no direct way; packages are only deleted through the garbage
collector. To prevent things from being re-downloaded/rebuilt, you
should register them as garbage collector roots. Nix-env and nix-build
do this automatically, and so do the build farm scripts if I'm not
mistaken.
However, by default registering a root only prevents the build results
(the derivation outputs) from being GC'ed, not the sources or any
build-time-only dependencies. To prevent those from being deleted, you
should set the options `gc-keep-outputs' and `gc-keep-derivations' to
`true' in /nix/etc/nix/nix.conf.
--
Eelco Dolstra | http://www.cs.uu.nl/~eelco
More information about the nix-dev
mailing list