Home Explore Blog Models CI



nix

doc/manual/source/command-ref/nix-env/list-generations.md
c85b82f7b9db94c4e07399858185e90266a21c8fac49190300000003000002a4
# Name

`nix-env --list-generations` - list profile generations

# Synopsis

`nix-env` `--list-generations`

# Description

This operation print a list of all the currently existing generations
for the active profile. These may be switched to using the
`--switch-generation` operation. It also prints the creation date of the
generation, and indicates the current generation.

{{#include ./opt-common.md}}

{{#include ../opt-common.md}}

{{#include ./env-common.md}}

{{#include ../env-common.md}}

# Examples

```console
$ nix-env --list-generations
  95   2004-02-06 11:48:24
  96   2004-02-06 11:49:01
  97   2004-02-06 16:22:45
  98   2004-02-06 16:24:33   (current)
```


Chunks
7ac33d07 (1st chunk of `doc/manual/source/command-ref/nix-env/list-generations.md`)
Title: nix-env --list-generations: List Profile Generations
Summary
The `nix-env --list-generations` command displays all existing generations for the active Nix profile. For each generation, it shows the creation date and highlights which one is currently active. Users can then switch to any of these listed generations using the `--switch-generation` operation. An example output demonstrates a list of generation numbers, their timestamps, and the '(current)' tag for the active generation.