How to Install uv on Ubuntu: The Blazing-Fast Python Package Manager

uv is an extremely fast Python package and project manager written in Rust by Astral. It aims to be the only Python tool you need day to day, collapsing pip, pipx, poetry, pyenv, virtualenv and twine into one command while running an order of magnitude or two faster than the tools it replaces.

uv has taken off across the Python world, but it is not in the Ubuntu archive. The usual routes are a curl-piped installer script or a manually downloaded binary, both of which leave you responsible for future updates.

The unofficial deb.griffo.io repository offers a cleaner path: uv packaged as a proper Ubuntu .deb and delivered over APT, so you install it and keep it current with the same commands you use for everything else.

What Makes uv Special?

  • ๐Ÿš€ One tool, many jobs - Stands in for pip, pipx, poetry, pyenv and virtualenv behind one interface.
  • โšก Rust-grade speed - Resolves and installs dependencies 10-100x faster than pip.
  • ๐Ÿ—‚๏ธ Real project management - Universal lockfiles, workspaces and deterministic resolution.
  • โ‡๏ธ Inline-script running - Runs scripts with PEP 723 inline dependencies in throwaway environments.
  • ๐Ÿ Python version management - Installs and pins CPython builds without pyenv.
  • ๐Ÿ› ๏ธ Tool runner - Installs and runs Python CLIs globally or on demand, like pipx.
  • ๐Ÿ”ฉ pip-compatible interface - uv pip keeps the commands you already know.
  • ๐Ÿ’พ Space-efficient cache - A shared global cache avoids re-downloading packages.

Why Use the deb.griffo.io Repository?

  • Easy installation and updates through APT rather than a shell installer.
  • Automatic dependency management provided by the Ubuntu packaging.
  • Always tracks upstream releases so you stay near the latest uv.
  • No compiling from source and no Rust toolchain to look after.
  • Works across supported Ubuntu releases, with the codename detected for you.

Prerequisites

Before starting, confirm you have:

  • An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
  • sudo privileges
  • curl installed (sudo apt install curl if needed)

Step 1: Add the deb.griffo.io Repository

Register the key and repository source:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

Breaking it down:

  1. Create the keyrings directory - makes sure /etc/apt/keyrings exists with the right permissions.
  2. Install the GPG key - downloads and de-armours the repository key into its own keyring so APT can verify signatures.
  3. Add the repository - writes a signed-by source line, letting lsb_release -sc fill in your Ubuntu codename.
  4. Update the package list - refreshes APTโ€™s view of available packages.

Step 2: Update the Package List

If you did not run the final command above, do it now:

sudo apt update

Step 3: Install uv

Install with APT:

sudo apt install uv

APT fetches uv and its dependencies and installs it across the system.

Step 4: Verify the Installation

The binary is uv. Check the version:

uv --version

You should see something like:

uv 0.8.4

Run uv --help for the complete command listing.

Getting Started with uv

The pip-Compatible Interface

If you are migrating from pip, the fastest way to feel at home is uv venv plus uv pip, which mirror the familiar workflow at much greater speed:

# Create a virtual environment
uv venv

# Install packages the pip way
uv pip install flask

# Compile and sync pinned requirements
uv pip compile requirements.in -o requirements.txt
uv pip sync requirements.txt

Managing a Full Project

For new work, let uv own the whole project lifecycle:

# Initialise a project
uv init my-service
cd my-service

# Add dependencies (runtime and dev)
uv add fastapi
uv add --dev ruff pytest

# Run inside the managed environment
uv run uvicorn main:app --reload

# Lock and sync
uv lock
uv sync

uv keeps pyproject.toml and uv.lock in step so the environment is reproducible anywhere.

Running Standalone Scripts

Thanks to PEP 723 inline metadata, a single script can carry its own dependencies:

echo 'import rich; rich.print("[bold green]hello from uv[/]")' > demo.py
uv add --script demo.py rich
uv run demo.py

uv builds a temporary environment on the fly and runs the script inside it.

Python Versions and Tools

uv doubles as a Python version manager and a pipx-style tool runner:

# Install and pin interpreters
uv python install 3.12
uv python pin 3.12

# Run a tool without a permanent install
uvx black --check .

# Install a tool onto your PATH
uv tool install httpie
uv tool list

Keeping uv Updated

uv rides along with your normal Ubuntu upgrades:

sudo apt update && sudo apt upgrade

When a newer uv appears in deb.griffo.io, apt upgrade installs it alongside your other packages.

Other Tools from deb.griffo.io

The repository includes many tools that complement a Python workflow:

  • Ruff - the blazing-fast linter and formatter from Astral.
  • just - a task runner for tidy, repeatable project commands.
  • Deno - a secure JavaScript and TypeScript runtime.
  • Bun - a fast all-in-one JavaScript runtime and toolkit.

Troubleshooting

GPG or Key Errors

If APT flags the repository as unsigned or the key as invalid, re-import it:

curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Package Not Found

If APT cannot locate uv:

  1. Re-run sudo apt update after adding the repository.
  2. Verify your Ubuntu release is supported (Jammy, Noble, or newer).
  3. Check the source list: cat /etc/apt/sources.list.d/deb.griffo.io.list.

A Previous uv Installer Shadows the Package

If you installed uv earlier with the standalone installer, an older binary in ~/.local/bin can override the packaged one:

which -a uv

Delete the stray binary or reorder your PATH so /usr/bin/uv wins. When uv comes from APT, manage upgrades with apt rather than uv self update.

Uninstalling

Remove uv with:

sudo apt remove uv

To also remove the repository and key:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Conclusion

On Ubuntu, deb.griffo.io turns uv into a first-class APT package: no installer script, no manual updates, just a fast and unified Python toolchain that you maintain with apt upgrade. Projects, lockfiles, interpreters and CLI tools all sit behind one command.

If you are looking to speed up local development or make CI pipelines leaner, uv is an excellent default, and installing it this way keeps it effortless to keep current.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream uv project.