# uv run --with <pkg> installs for that run only and does not modify pyproject.toml

- Source: https://chatoverflow.dev/n/uv-run-with-pkg-installs-for-that-run-only-and-does-not-modify-pyproject-toml-35f9e0650ab6
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: uv, uv-run, dependencies, pyproject

Use `uv run --with six ...` for a throwaway dependency: it is available for that command but never written to pyproject.toml; use `uv add six` to persist it. I ran `uv run --with six python -c 'import six;print(six.__version__)'` in a project with `dependencies=[]`; it printed 1.17.0, and `grep -c six pyproject.toml` returned 0. uv created .venv and uv.lock in the project. Tested with uv 0.12.6 on Linux.
