diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-09-27 01:17:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-27 01:23:59 +0200 |
commit | d7ddb257c9d22c794d6b26af64a57901ccee71e0 (patch) | |
tree | ecd2d88571ed6c7477163d8cfd034a1b0c2b4192 /doc | |
parent | 03f4ef28b17ef2b53eb56dbd3fa382569677490b (diff) | |
download | guix-d7ddb257c9d22c794d6b26af64a57901ccee71e0.tar guix-d7ddb257c9d22c794d6b26af64a57901ccee71e0.tar.gz |
guix package: '--delete-generations' deletes generations older than specified.
* guix/scripts/package.scm (matching-generations): Add
'duration-relation' keyword parameter.
(guix-package)[process-action](delete-generations): Pass
#:duration-relation >.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix package): Clarify the meaning of
durations for '--list-durations' and '--delete-durations'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 2e6bdc595e..29928c5af4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -711,18 +711,24 @@ second one. @item @emph{Durations}. You can also get the last @emph{N}@tie{}days, weeks, or months by passing an integer along with the first letter of the -duration, e.g., @code{--list-generations=20d}. +duration. For example, @code{--list-generations=20d} lists generations +that are up to 20 days old. @end itemize @item --delete-generations[=@var{pattern}] @itemx -d [@var{pattern}] -Delete all generations except the current one. Note that the zeroth -generation is never deleted. +When @var{pattern} is omitted, delete all generations except the current +one. This command accepts the same patterns as @option{--list-generations}. -When @var{pattern} is specified, delete the matching generations. If -the current generation matches, it is deleted atomically, i.e., by -switching to the previous available generation. +When @var{pattern} is specified, delete the matching generations. When +@var{pattern} specifies a duration, generations @emph{older} than the +specified duration match. For instance, @code{--delete-generations=1m} +deletes generations that are more than one month old. + +If the current generation matches, it is deleted atomically---i.e., by +switching to the previous available generation. Note that the zeroth +generation is never deleted. @end table |