Home Explore Blog Models CI



nix

doc/manual/source/command-ref/nix-env/uninstall.md
4157bb799dd5e5cdd4b73ff9dbdf0eb7cadecf776a8ce9f70000000300000234
# Name

`nix-env --uninstall` - remove packages from user environment

# Synopsis

`nix-env` {`--uninstall` | `-e`} *drvnames…*

# Description

The uninstall operation creates a new user environment, based on the
current generation of the active profile, from which the store paths
designated by the symbolic names *drvnames* are removed.

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

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

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

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

# Examples

```console
$ nix-env --uninstall gcc
$ nix-env --uninstall '.*' (remove everything)
```

Chunks
d7e6c560 (1st chunk of `doc/manual/source/command-ref/nix-env/uninstall.md`)
Title: nix-env --uninstall Command
Summary
The `nix-env --uninstall` command (also `nix-env -e`) is used to remove packages from a user's environment. It functions by creating a *new* user environment. This new environment is based on the current generation of the active profile, but with the store paths corresponding to the specified symbolic names (`drvnames`) removed. Examples include uninstalling a specific package like `gcc` or removing all packages using `'.*'`. The command also incorporates common options from other documentation files.