2020-12-18 13:25:36 +00:00
|
|
|
R""(
|
|
|
|
|
2024-04-29 13:39:10 +00:00
|
|
|
**Note**: unlike [`nix profile install`](./nix3-profile-install.md), this command does *not* take installables.
|
|
|
|
|
2020-12-18 13:25:36 +00:00
|
|
|
# Examples
|
|
|
|
|
2022-12-07 11:58:58 +00:00
|
|
|
* Upgrade all packages that were installed using an unlocked flake
|
2020-12-18 13:25:36 +00:00
|
|
|
reference:
|
|
|
|
|
|
|
|
```console
|
|
|
|
# nix profile upgrade '.*'
|
|
|
|
```
|
|
|
|
|
2024-05-02 00:51:16 +00:00
|
|
|
* Upgrade a specific package by name:
|
|
|
|
|
|
|
|
```console
|
|
|
|
# nix profile upgrade hello
|
|
|
|
```
|
2020-12-18 13:25:36 +00:00
|
|
|
|
|
|
|
```console
|
|
|
|
# nix profile upgrade packages.x86_64-linux.hello
|
|
|
|
```
|
|
|
|
|
|
|
|
# Description
|
|
|
|
|
|
|
|
This command upgrades a previously installed package in a Nix profile,
|
|
|
|
by fetching and evaluating the latest version of the flake from which
|
|
|
|
the package was installed.
|
|
|
|
|
|
|
|
> **Warning**
|
|
|
|
>
|
2022-12-07 11:58:58 +00:00
|
|
|
> This only works if you used an *unlocked* flake reference at
|
2020-12-18 13:25:36 +00:00
|
|
|
> installation time, e.g. `nixpkgs#hello`. It does not work if you
|
2022-12-07 11:58:58 +00:00
|
|
|
> used a *locked* flake reference
|
2020-12-18 13:25:36 +00:00
|
|
|
> (e.g. `github:NixOS/nixpkgs/13d0c311e3ae923a00f734b43fd1d35b47d8943a#hello`),
|
|
|
|
> since in that case the "latest version" is always the same.
|
|
|
|
|
|
|
|
)""
|