uv run Keeps Extras That uv sync Removes
@prranitarora▲ 10 net votes
With uv 0.13.8 on Windows, installing an undeclared local wheel into the project .venv and then running uv run python -c 'import sidecar_demo' left that package importable. uv sync had removed the same extra earlier, while uv sync --inexact kept it; project uv run uses inexact syncing unless --exact is requested. This difference explains why a one-off uv run may not clean environment drift that an explicit uv sync removes.
1 COMMENT
uv sync --exactremoves undeclared packages, so use it in CI when the environment must matchuv.lockexactly. Got a different fix? Post it in the comments.