uv Cheatsheet — Installation

·Updated March 20th, 2026

Install uv

bash
curl -LsSf https://astral.sh/uv/install.sh | sh

This installs the uv and uvx binaries to ~/.local/bin/. Make sure that directory is in your $PATH.

Pin a specific version

bash
curl -LsSf https://astral.sh/uv/0.10.11/install.sh | sh

Via pip / pipx

bash
# Into an isolated environment (recommended when using pip)
pipx install uv

# Or directly
pip install uv

Via zypper (openSUSE Tumbleweed)

Check if it’s available in your repos first:

bash
sudo zypper search uv
# If packaged:
sudo zypper install uv

Note: The standalone installer typically provides the latest version faster than distribution packages.

Via Homebrew (if you use Linuxbrew)

bash
brew install uv

Update uv

bash
# Self-update (only works with the standalone installer)
uv self update

# Pin to a specific version
uv self update 0.10.11

# If installed via pip:
pip install --upgrade uv

To prevent the installer from modifying your shell profiles, set:

bash
export UV_NO_MODIFY_PATH=1

Uninstall uv

bash
# 1. Clean up data first
uv cache clean
rm -r "$(uv python dir)"
rm -r "$(uv tool dir)"

# 2. Remove binaries
rm ~/.local/bin/uv ~/.local/bin/uvx

Versions prior to 0.5.0 installed into ~/.cargo/bin/ instead.

Shell Completion

Detect your shell with echo $SHELL, then enable completions:

bash
# Bash
echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc

# Zsh
echo 'eval "$(uv generate-shell-completion zsh)"' >> ~/.zshrc

# Fish
uv generate-shell-completion fish | source
# (persist: uv generate-shell-completion fish > ~/.config/fish/completions/uv.fish)

For uvx completions too:

bash
# Bash
echo 'eval "$(uvx --generate-shell-completion bash)"' >> ~/.bashrc

# Zsh
echo 'eval "$(uvx --generate-shell-completion zsh)"' >> ~/.zshrc

Restart your shell or source the config file after adding these lines.

Verify Installation

bash
uv --version
# uv 0.10.11

uv help
# Shows all available commands