Skip to content

Commit

Permalink
Note that uv lock --upgrade-package retains locked versions
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Sep 25, 2024
1 parent f5601e2 commit a8c07ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/concepts/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ To upgrade all packages:
$ uv lock --upgrade
```

To upgrade a single package to the latest version:
To upgrade a single package to the latest version, while retaining the locked versions of all other
packages:

```console
$ uv lock --upgrade-package <package>
Expand Down
9 changes: 9 additions & 0 deletions docs/guides/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ To remove a package, you can use `uv remove`:
$ uv remove requests
```

To upgrade a package, run `uv lock` with the `--upgrade-package` flag:

```console
$ uv lock --upgrade-package requests
```

The `--upgrade-package` flag will attempt to update the specified package to the latest compatible
version, while keeping the rest of the lockfile intact.

See the documentation on [managing dependencies](../concepts/projects.md#managing-dependencies) for
more details.

Expand Down

0 comments on commit a8c07ff

Please sign in to comment.