2021-02-15 00:41:15 +00:00
|
|
|
# update
|
|
|
|
The `update` subcommand is a simple alias for:
|
|
|
|
```sh
|
2021-03-15 03:27:58 +00:00
|
|
|
nix flake update
|
2021-02-15 00:41:15 +00:00
|
|
|
```
|
2021-03-15 03:27:58 +00:00
|
|
|
As it sounds, this will update your lock file.
|
2021-02-23 02:49:31 +00:00
|
|
|
|
|
|
|
## Updating Package Sources
|
2021-03-15 03:27:58 +00:00
|
|
|
If you pass directory name then it will update that input if the directory
|
|
|
|
contains a flake.nix, with an optional arguement to update only a specific
|
|
|
|
input in the subflake.
|
2021-02-23 02:49:31 +00:00
|
|
|
|
|
|
|
For example, you can update any
|
2021-04-19 02:26:27 +00:00
|
|
|
[package sources](../outputs/pkgs.md#automatic-source-updates) you may have
|
|
|
|
declared in _pkgs/flake.nix_:
|
2021-02-23 02:49:31 +00:00
|
|
|
```sh
|
2021-03-15 03:27:58 +00:00
|
|
|
flk update pkgs
|
|
|
|
```
|
|
|
|
or just its _nixpkgs_:
|
|
|
|
```sh
|
|
|
|
flk update pkgs nixpkgs
|
2021-02-23 02:49:31 +00:00
|
|
|
```
|