diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-01 15:15:32 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-01 15:15:32 -0400 |
commit | f7f44f7c96eaa65b096e1448591e5790a58f3ad9 (patch) | |
tree | 1fdcfbbc31a1496075dd6796043c75426ee8da1c /doc/manual/src/command-ref/nix-env/delete-generations.md | |
parent | 5abd643c6d10f2cfa6e26652a9688a0263310094 (diff) | |
parent | aa99005004bccc9be506a2a2f162f78bad4bcb41 (diff) |
Merge commit 'aa99005004bccc9be506a2a2f162f78bad4bcb41' into ca-drv-exotic
Diffstat (limited to 'doc/manual/src/command-ref/nix-env/delete-generations.md')
-rw-r--r-- | doc/manual/src/command-ref/nix-env/delete-generations.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/manual/src/command-ref/nix-env/delete-generations.md b/doc/manual/src/command-ref/nix-env/delete-generations.md new file mode 100644 index 000000000..6f0af5384 --- /dev/null +++ b/doc/manual/src/command-ref/nix-env/delete-generations.md @@ -0,0 +1,46 @@ +# Name + +`nix-env --delete-generations` - delete profile generations + +# Synopsis + +`nix-env` `--delete-generations` *generations* + +# Description + +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, 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), or a value +such as `+5` to keep the last `5` generations ignoring any newer than +current, e.g., if `30` is the current generation `+5` will delete +generation `25` and all older generations. Periodically deleting old +generations is important to make garbage collection effective. + +{{#include ./opt-common.md}} + +{{#include ../opt-common.md}} + +{{#include ./env-common.md}} + +{{#include ../env-common.md}} + +# Examples + +```console +$ nix-env --delete-generations 3 4 8 +``` + +```console +$ nix-env --delete-generations +5 +``` + +```console +$ nix-env --delete-generations 30d +``` + +```console +$ nix-env -p other_profile --delete-generations old +``` + |