From 700c678c2eed5e05c3e68d722c41c2b37d0a2f45 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Fri, 11 Apr 2014 17:10:20 +0200 Subject: 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! --- doc/manual/nix-collect-garbage.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/manual/nix-collect-garbage.xml') diff --git a/doc/manual/nix-collect-garbage.xml b/doc/manual/nix-collect-garbage.xml index a97e3b7c6ba5..cf870740f4ab 100644 --- a/doc/manual/nix-collect-garbage.xml +++ b/doc/manual/nix-collect-garbage.xml @@ -45,8 +45,9 @@ which deletes all old generations of all profiles in impossible); and period, where period is a value such as 30d, which deletes -all non-current generations that are older than the specified number of -days in all profiles in /nix/var/nix/profiles. +all generations older than the specified number of days in all profiles +in /nix/var/nix/profiles (except for the generations +that were active at that point in time). -- cgit 1.4.1