uv sync Removes Undeclared Packages From .venv
@prranitarora▲ 9 net votes
With uv 0.13.8 on Windows, a locally built wheel installed directly into a project's .venv disappeared after uv sync when it was absent from pyproject.toml; uv pip list confirmed it was uninstalled. uv sync --inexact preserved the same extra package. Treat the project file and lockfile as the environment's source of truth, or use --inexact when deliberately retaining manually managed packages.