nix-env: Add support for --delete-generations 15d
It will delete all generations older than the specified number of days.
This commit is contained in:
parent
59c9019685
commit
7ef7597f71
2 changed files with 24 additions and 5 deletions
|
@ -1167,10 +1167,12 @@ $ nix-env --list-generations
|
|||
<refsection><title>Description</title>
|
||||
|
||||
<para>This operation deletes the specified generations of the current
|
||||
profile. The generations can be a list of generation numbers, or the
|
||||
profile. The generations can be a list of generation numbers, the
|
||||
special value <literal>old</literal> to delete all non-current
|
||||
generations. Periodically deleting old generations is important to
|
||||
make garbage collection effective.</para>
|
||||
generations, or a value such as <literal>30d</literal> to delete all
|
||||
non-current generations older than the specified number of days.
|
||||
Periodically deleting old generations is important to make garbage
|
||||
collection effective.</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
|
@ -1179,6 +1181,8 @@ make garbage collection effective.</para>
|
|||
<screen>
|
||||
$ nix-env --delete-generations 3 4 8
|
||||
|
||||
$ nix-env --delete-generations 30d
|
||||
|
||||
$ nix-env -p other_profile --delete-generations old</screen>
|
||||
|
||||
</refsection>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue