Open dpoznik opened 3 weeks ago
uv tool install --reinstall <PACKAGE>
will reinstall <PACKAGE>
and all of its dependencies (whereas uv tool --reinstall-package <FOO> <PACKAGE>
will reinstall <FOO>
, but not <PACKAGE>
). Any suggestions on how to make this clearer?
--reinstall
is not "Reinstall all tools", but it's like "Reinstall everything for one tool".
Maybe this is a clarification. Here PACKAGE is the tool you want to install:
Usage: uv tool install [OPTIONS] <PACKAGE>
But below, packages is all the distribution packages in the installation of the tool (the previous single PACKAGE
).
Installer options:
--reinstall
Reinstall all packages, regardless of whether they're already installed. Implies
`--refresh`
Any suggestions on how to make this clearer?
Perhaps something like the following, wherein instances of "package" have been edited to forms of "dependency" to disambiguate "packages" providing tools from "packages" these tool-providing packages depend on:
--reinstall Reinstall all dependencies, regardless of whether they're already installed. Implies `--refresh`
--reinstall-package <DEPENDENCY> Reinstall a specific dependency, regardless of whether it's already installed. Implies `--refresh-package`
--refresh Refresh all cached data
--refresh-package <DEPENDENCY> Refresh cached data for a specific dependency
It may be even clearer if the second and fourth option were --reinstall-dependency
and --refresh-dependency
, respectively. But that would involve more than just a documentation tweak.
Thanks!
Relatedly, does uv tool
have an equivalent to pipx
's reinstall-all
subcommand?
I find this useful when, for example, upgrading Python.
You can do uv tool upgrade --all
. You can even do uv tool upgrade --all --python 3.13
to upgrade all installed tools to Python 3.13.
You can do
uv tool upgrade --all
. You can even douv tool upgrade --all --python 3.13
to upgrade all installed tools to Python 3.13.
Ah, so uv tool upgrade
is closer in behavior to pipx reinstall
than to pipx upgrade
, which upgrades a tool within its existing environment. Got it. Thanks!
If not already present, it may be worth noting this contrast somewhere in the docs to help folks transition.
\cc @zanieb for opinions on changing the --reinstall
docs.
The docs suggest that
uv tool install --reinstall
should reinstall all packages:This suggests that one need not specify a particular package. But in practice, a package name is expected: