e.g. nix-env -e subversion => nix-env --uninstall subversion The aim is to make the documentation less cryptic for newcomers and the long options are more self-documenting. The change was made with the following script: <https://github.com/aschmolck/convert-short-nix-opts-to-long-ones> and sanity checked visually.
1.1 KiB
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
$ nix-env --delete-generations 3 4 8
$ nix-env --delete-generations +5
$ nix-env --delete-generations 30d
$ nix-env --profile other_profile --delete-generations old