From 2c1ecf8e81f8ea5a9fa228aa22a57a6ba0a0e4df Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Sep 2013 21:15:47 +0200 Subject: nix-env -i: Add a flag ‘--remove-all’ / ‘-r’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is equivalent to running ‘nix-env -e '*'’ first, except that it happens in a single transaction. Thus, ‘nix-env -i pkgs...’ replaces the profile with the specified set of packages. The main motivation is to support declarative package management (similar to environment.systemPackages in NixOS). That is, if you have a specification ‘profile.nix’ like this: with import {}; [ thunderbird geeqie ... ] then after any change to ‘profile.nix’, you can run: $ nix-env -f profile.nix -ir to update the profile to match the specification. (Without the ‘-r’ flag, if you remove a package from ‘profile.nix’, it won't be removed from the actual profile.) Suggested by @zefhemel. --- doc/manual/nix-env.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/manual') diff --git a/doc/manual/nix-env.xml b/doc/manual/nix-env.xml index 84c875dad2..03111515a4 100644 --- a/doc/manual/nix-env.xml +++ b/doc/manual/nix-env.xml @@ -209,6 +209,10 @@ also . + + + + args @@ -318,6 +322,16 @@ number of possible ways: + + + + Remove all previously installed packages first. + This is equivalent to running nix-env -e '*' + first, except that everything happens in a single + transaction. + + + -- cgit 1.4.1