tldr/pages/common/nix-env.md

37 lines
571 B
Markdown
Raw Permalink Normal View History

2015-10-30 03:20:12 +00:00
# nix-env
> Manipulate or query Nix user environments.
> More information: <https://nixos.org/manual/nix/stable/#sec-nix-env>.
2015-10-30 03:20:12 +00:00
- List all installed packages:
2015-10-30 03:20:12 +00:00
`nix-env -q`
2015-10-30 03:20:12 +00:00
- Query installed packages:
2015-10-30 03:20:12 +00:00
`nix-env -q {{search_term}}`
- Query available packages:
`nix-env -qa {{search_term}}`
2015-10-30 03:20:12 +00:00
- Install package:
2015-10-30 03:20:12 +00:00
2020-06-17 16:59:02 +01:00
`nix-env -iA nixpkgs.{{pkg_name}}`
2015-10-30 03:20:12 +00:00
2019-10-29 00:33:18 +00:00
- Install a package from a URL:
`nix-env -i {{pkg_name}} --file {{example.com}}`
- Uninstall package:
2015-10-30 03:20:12 +00:00
`nix-env -e {{pkg_name}}`
- Upgrade one package:
2015-10-30 03:20:12 +00:00
`nix-env -u {{pkg_name}}`
- Upgrade all packages:
2015-10-30 03:20:12 +00:00
`nix-env -u`