2015-10-30 03:20:12 +00:00
|
|
|
# nix-env
|
|
|
|
|
2016-01-24 23:15:17 +00:00
|
|
|
> Manipulate or query Nix user environments.
|
2021-01-01 22:12:38 +00:00
|
|
|
> More information: <https://nixos.org/manual/nix/stable/#sec-nix-env>.
|
2015-10-30 03:20:12 +00:00
|
|
|
|
2019-02-28 16:50:42 +00:00
|
|
|
- List all installed packages:
|
2015-10-30 03:20:12 +00:00
|
|
|
|
2019-02-28 16:50:42 +00:00
|
|
|
`nix-env -q`
|
2015-10-30 03:20:12 +00:00
|
|
|
|
2019-02-28 16:50:42 +00:00
|
|
|
- Query installed packages:
|
2015-10-30 03:20:12 +00:00
|
|
|
|
2019-02-28 16:50:42 +00:00
|
|
|
`nix-env -q {{search_term}}`
|
|
|
|
|
|
|
|
- Query available packages:
|
|
|
|
|
|
|
|
`nix-env -qa {{search_term}}`
|
2015-10-30 03:20:12 +00:00
|
|
|
|
2016-01-24 23:15:17 +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}}`
|
|
|
|
|
2016-01-24 23:15:17 +00:00
|
|
|
- Uninstall package:
|
2015-10-30 03:20:12 +00:00
|
|
|
|
|
|
|
`nix-env -e {{pkg_name}}`
|
|
|
|
|
2016-01-24 23:15:17 +00:00
|
|
|
- Upgrade one package:
|
2015-10-30 03:20:12 +00:00
|
|
|
|
|
|
|
`nix-env -u {{pkg_name}}`
|
|
|
|
|
2016-01-24 23:15:17 +00:00
|
|
|
- Upgrade all packages:
|
2015-10-30 03:20:12 +00:00
|
|
|
|
|
|
|
`nix-env -u`
|