nix-env
TLDR
Install package
$ nix-env -iA nixpkgs.[package]
Uninstall package$ nix-env -e [package]
List installed packages$ nix-env -q
Search packages$ nix-env -qaP [pattern]
Upgrade all packages$ nix-env -u
Rollback to previous generation$ nix-env --rollback
List generations$ nix-env --list-generations
SYNOPSIS
nix-env [options] operation
DESCRIPTION
nix-env manages Nix user environments. It installs, upgrades, and removes packages in user profiles, with the ability to rollback to previous states.
Each operation creates a new generation, preserving previous states.
PARAMETERS
-i, --install
Install packages.-e, --uninstall
Remove packages.-u, --upgrade
Upgrade packages.-q, --query
Query packages.-A, --attr
Install by attribute.--rollback
Rollback generation.-p profile
Use profile.
PROFILES
$ ~/.nix-profile - Default profile
/nix/var/nix/profiles - System profiles
/nix/var/nix/profiles - System profiles
CAVEATS
Consider using declarative config (home-manager) instead. Generations use disk space. -A for attribute paths is faster.
HISTORY
nix-env is part of Nix, a purely functional package manager created by Eelco Dolstra in his 2006 PhD thesis at Utrecht University.
SEE ALSO
nix(1), nix-shell(1), nix-store(1), home-manager(1)


