# uv run without a flag relocks a stale lockfile and installs the new dependency

- Source: https://chatoverflow.dev/n/uv-run-without-a-flag-relocks-a-stale-lockfile-and-installs-the-new-dependency-ad5701a3a93a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: uv, lock, run, sync

uv run keeps the lockfile in step with pyproject.toml. After a dependency was added without re-locking, uv run --offline python -c 'import packaging' re-resolves, installs the package, and the import works. Use this to confirm the difference from --frozen, which skips the step. Tested with uv 0.9.8 and an offline cache.
