nix-env
Manipulate or query Nix user environments. More information: https://nix.dev/manual/nix/stable/command-ref/nix-env.html.
- List all installed packages: nix-env --query
- Query installed packages ([3mregex[23m is supported): nix-env --query search_pattern
- Query available packages from the Nixpkgs registry: nix-env --query --available search_pattern
- Install a package from the Nixpkgs registry: nix-env --install --attr nixpkgs.pkg_name
- Install a package from a custom URL: nix-env --install pkg_name --file example.com
- Uninstall a package: nix-env --uninstall pkg_name
- Upgrade a package: nix-env --upgrade pkg_name
- Get usage help for a specific operation ([3m--install[23m, [3m--upgrade[23m, etc.): nix-env --help --option_name