From 5230d3ecc4cd3a3d965902a56b5a21bcc99821c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domagoj=20Mi=C5=A1kovi=C4=87?= <157494086+allrealmsoflife@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:20:44 +0100 Subject: [PATCH] Document `--max-freed` for `nix-collect-garbage` (#12155) * Update nix-collect-garbage.md Referencing issue at: https://github.com/NixOS/nix/issues/12132 Copied the description of `--max-freed` option from https://github.com/NixOS/nix/blob/442a2623e48357ff72c77bb11cf2cf06d94d2f90/doc/manual/source/command-ref/nix-store/gc.md?plain=1#L39-L44 --- doc/manual/source/command-ref/nix-collect-garbage.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/manual/source/command-ref/nix-collect-garbage.md b/doc/manual/source/command-ref/nix-collect-garbage.md index bd05f2816..763179b8e 100644 --- a/doc/manual/source/command-ref/nix-collect-garbage.md +++ b/doc/manual/source/command-ref/nix-collect-garbage.md @@ -62,6 +62,15 @@ These options are for deleting old [profiles] prior to deleting unreachable [sto This is the equivalent of invoking [`nix-env --delete-generations `](@docroot@/command-ref/nix-env/delete-generations.md#generations-time) on each found profile. See the documentation of that command for additional information about the *period* argument. + - [`--max-freed`](#opt-max-freed) *bytes* + + + + Keep deleting paths until at least *bytes* bytes have been deleted, + then stop. The argument *bytes* can be followed by the + multiplicative suffix `K`, `M`, `G` or `T`, denoting KiB, MiB, GiB + or TiB units. + {{#include ./opt-common.md}} {{#include ./env-common.md}}