2020-12-18 15:25:36 +02:00
|
|
|
R""(
|
|
|
|
|
|
|
|
# Examples
|
|
|
|
|
2022-12-07 13:58:58 +02:00
|
|
|
* Upgrade all packages that were installed using an unlocked flake
|
2020-12-18 15:25:36 +02:00
|
|
|
reference:
|
|
|
|
|
|
|
|
```console
|
2024-03-07 21:33:59 +02:00
|
|
|
# nix profile upgrade --regex '.*'
|
2020-12-18 15:25:36 +02:00
|
|
|
```
|
|
|
|
|
2023-07-09 23:16:21 +03:00
|
|
|
* Upgrade a specific package by name:
|
2020-12-18 15:25:36 +02:00
|
|
|
|
|
|
|
```console
|
2023-07-09 23:16:21 +03:00
|
|
|
# nix profile upgrade hello
|
2020-12-18 15:25:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
# 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 13:58:58 +02:00
|
|
|
> This only works if you used an *unlocked* flake reference at
|
2020-12-18 15:25:36 +02:00
|
|
|
> installation time, e.g. `nixpkgs#hello`. It does not work if you
|
2022-12-07 13:58:58 +02:00
|
|
|
> used a *locked* flake reference
|
2020-12-18 15:25:36 +02:00
|
|
|
> (e.g. `github:NixOS/nixpkgs/13d0c311e3ae923a00f734b43fd1d35b47d8943a#hello`),
|
|
|
|
> since in that case the "latest version" is always the same.
|
|
|
|
|
|
|
|
)""
|