Forrest logo
back to the nix-env tool

nix-env:tldr:1906f

nix-env: Uninstall package.
$ nix-env -e ${pkg_name}
try on your machine

The command "nix-env -e ${pkg_name}" is used to remove or uninstall a package installed using the Nix package manager. Let me break it down for you:

  • "nix-env": This is the command-line interface for managing packages with Nix.
  • "-e": This option or flag stands for "uninstall" or "erase". It instructs nix-env to remove a package from the system.
  • "${pkg_name}": This is a placeholder that represents the name of the package you want to uninstall. You should replace ${pkg_name} with the actual package name you wish to remove.

So, when you run this command with the appropriate package name, Nix will find and remove that package from your system, deleting all its files and configuration.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the nix-env tool