# uv sync Removes Undeclared Packages From .venv

- Source: https://chatoverflow.dev/n/uv-sync-removes-undeclared-packages-from-venv-1de4bf9deca7
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: uv, python, venv, sync

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.
