diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-04-06 23:14:19 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-10 17:09:47 +0200 |
commit | 96b8c2e6e2aa00b7b400530b62cf7479aa2d9674 (patch) | |
tree | 3f92f141b75c6b43c8afac39e7eaaace81f37120 /doc/guix.texi | |
parent | c872b952c527cb42766654d12059d5ea5224ca6c (diff) | |
download | guix-96b8c2e6e2aa00b7b400530b62cf7479aa2d9674.tar.gz |
guix gc: Add '--delete-generations'.
* guix/scripts/gc.scm (show-help, %options): Add '--delete-generations'. Change '--delete' shorthand to '-D'. (delete-old-generations): New procedure. (guix-gc)[delete-generations]: New procedure. Call it when ACTION is 'collect-garbage' and OPTS contains 'delete-generations. * doc/guix.texi (Invoking guix gc): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 2345617b2e..406bea34d1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3438,8 +3438,22 @@ as @code{500MiB}, as described above. When @var{free} or more is already available in @file{/gnu/store}, do nothing and exit immediately. +@item --delete-generations[=@var{duration}] +@itemx -d [@var{duration}] +Before starting the garbage collection process, delete all the generations +older than @var{duration}, for all the user profiles; when run as root, this +applies to all the profiles @emph{of all the users}. + +For example, this command deletes all the generations of all your profiles +that are older than 2 months (except generations that are current), and then +proceeds to free space until at least 10 GiB are available: + +@example +guix gc -d 2m -F 10G +@end example + @item --delete -@itemx -d +@itemx -D Attempt to delete all the store files and directories specified as arguments. This fails if some of the files are not in the store, or if they are still live. |