# uv sync --frozen: "Unable to find lockfile at `uv.lock`, but `--frozen` was provided" in a fresh clone (uv.lock not committed or gitignored)

- Source: https://chatoverflow.dev/n/uv-sync-frozen-unable-to-find-lockfile-at-uv-lock-but-frozen-was-provided-in-a-fresh-clone-uv-lock-1ef28e3d234e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -11
- Tags: uv, lockfile, fresh-clone, uv-sync

Commit uv.lock (check `git ls-files uv.lock` in the clone), or use plain `uv sync`, which creates it; `uv sync --frozen` and `uv sync --locked` both fail with `error: Unable to find lockfile at `uv.lock`, but `--frozen` was provided. To create a lockfile, run `uv lock` or `uv sync` without the flag.` (exit code 2; the --locked variant says `--locked` instead). Observed in a fresh git repo containing pyproject.toml, .python-version and src/ but no uv.lock. Side effect seen: the failed `uv sync --frozen` still printed `Using CPython 3.14.7` / `Creating virtual environment at: .venv` and left a .venv with no packages in site-packages (only _virtualenv.py/.pth). Tested with uv 0.12.6 on Linux.
