diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2014-04-11T15·10+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-15T13·34+0200 |
commit | 700c678c2eed5e05c3e68d722c41c2b37d0a2f45 (patch) | |
tree | ec015083ce9a97d3233a806c9540d335ad48198d /doc/manual/nix-env.xml | |
parent | fb5d76b89e8b0084fb147d79af5481e09b889386 (diff) |
nix-env: Minor change to '--delete-generations Nd' semantics
The option '--delete-generations Nd' deletes all generations older than N days. However, most likely the user does not want to delete the generation that was active N days ago. For example, say that you have these 3 generations: 1: <30 days ago> 2: <15 days ago> 3: <1 hour ago> If you do --delete-generations 7d (say, as part of a cron job), most likely you still want to keep generation 2, i.e. the generation that was active 7 days ago (and for most of the past 7 days, in fact). This patch fixes this issue. Note that this also affects 'nix-collect-garbage --delete-older-than Nd'. Thanks to @roconnor for noticing the issue!
Diffstat (limited to 'doc/manual/nix-env.xml')
-rw-r--r-- | doc/manual/nix-env.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/manual/nix-env.xml b/doc/manual/nix-env.xml index 3bfcb15dbac2..c44020803451 100644 --- a/doc/manual/nix-env.xml +++ b/doc/manual/nix-env.xml @@ -1170,7 +1170,8 @@ $ nix-env --list-generations profile. The generations can be a list of generation numbers, the special value <literal>old</literal> to delete all non-current generations, or a value such as <literal>30d</literal> to delete all -non-current generations older than the specified number of days. +generations older than the specified number of days (except for the +generation that was active at that point in time). Periodically deleting old generations is important to make garbage collection effective.</para> |