From 429154b74c7f4b4d679ae79bbc939049f537bfaf Mon Sep 17 00:00:00 2001 From: Matthew O'Gorman Date: Wed, 6 Jan 2016 20:15:19 -0500 Subject: Implement --delete-generations + flag for keeping last N number of generations --- doc/manual/command-ref/nix-env.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/manual') diff --git a/doc/manual/command-ref/nix-env.xml b/doc/manual/command-ref/nix-env.xml index d4563ac47551..f0e70a41c024 100644 --- a/doc/manual/command-ref/nix-env.xml +++ b/doc/manual/command-ref/nix-env.xml @@ -1346,9 +1346,10 @@ $ nix-env --list-generations This operation deletes the specified generations of the current profile. The generations can be a list of generation numbers, the special value old to delete all non-current -generations, or a value such as 30d to delete all +generations, a value such as 30d to delete all generations older than the specified number of days (except for the -generation that was active at that point in time). +generation that was active at that point in time), or a value such as. ++5 to delete all but the number of items specified. Periodically deleting old generations is important to make garbage collection effective. @@ -1359,6 +1360,8 @@ collection effective. $ nix-env --delete-generations 3 4 8 +$ nix-env --delete-generations +5 + $ nix-env --delete-generations 30d $ nix-env -p other_profile --delete-generations old -- cgit 1.4.1