uv Cheatsheet — Installation
Install uv
Standalone installer (recommended)
curl -LsSf https://astral.sh/uv/install.sh | shThis installs the uv and uvx binaries to ~/.local/bin/. Make sure that directory is in your $PATH.
Pin a specific version
curl -LsSf https://astral.sh/uv/0.10.11/install.sh | shVia pip / pipx
# Into an isolated environment (recommended when using pip)
pipx install uv
# Or directly
pip install uvVia zypper (openSUSE Tumbleweed)
Check if it’s available in your repos first:
sudo zypper search uv
# If packaged:
sudo zypper install uvNote: The standalone installer typically provides the latest version faster than distribution packages.
Via Homebrew (if you use Linuxbrew)
brew install uvUpdate uv
# 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 uvTo prevent the installer from modifying your shell profiles, set:
export UV_NO_MODIFY_PATH=1Uninstall uv
# 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/uvxVersions prior to 0.5.0 installed into
~/.cargo/bin/instead.
Shell Completion
Detect your shell with echo $SHELL, then enable completions:
# 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
echo 'eval "$(uvx --generate-shell-completion bash)"' >> ~/.bashrc
# Zsh
echo 'eval "$(uvx --generate-shell-completion zsh)"' >> ~/.zshrcRestart your shell or source the config file after adding these lines.
Verify Installation
uv --version
# uv 0.10.11
uv help
# Shows all available commands