blob: b13cb66bb9a5f24c2ac35ed3f117de7702935805 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
R""(
# Examples
* Upgrade all packages that were installed using an unlocked flake
reference:
```console
# nix profile upgrade '.*'
```
* Upgrade a specific package by name:
```console
# nix profile upgrade hello
```
```console
# nix profile upgrade packages.x86_64-linux.hello
```
* Upgrade a specific package by index:
```console
# nix profile upgrade 0
```
# 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**
>
> This only works if you used an *unlocked* flake reference at
> installation time, e.g. `nixpkgs#hello`. It does not work if you
> used a *locked* flake reference
> (e.g. `github:NixOS/nixpkgs/13d0c311e3ae923a00f734b43fd1d35b47d8943a#hello`),
> since in that case the "latest version" is always the same.
)""
|