uv-self
Manage uv tool installation
TLDR
Update uv to the latest version
Update uv to a specific version
Check for available uv updates without installing
Update uv with verbose output
Display the current uv version
Display only the version number
Display version information in JSON format
SYNOPSIS
`uv self` <COMMAND>
`uv self update` [OPTIONS]
`uv self install` [OPTIONS]
`uv self uninstall` [OPTIONS]
PARAMETERS
--tag <TAG>
(For `update` and `install`) Specifies a particular version tag (e.g., `0.1.0`) to update to or install.
--branch <BRANCH>
(For `update` and `install`) Specifies a Git branch to update to or install from.
--prerelease
(For `update`) Allows updating to prerelease versions of uv, which may be unstable.
--force
(For `install`) Overwrites an existing uv installation at the target path without prompting.
--name <NAME>
(For `install` and `uninstall`) Specifies the name of the executable (e.g., `uv`, `uv-nightly`) to install or uninstall.
--path <PATH>
(For `install` and `uninstall`) Specifies the exact directory where uv should be installed or uninstalled from. This path must be writable.
--prefix <PATH>
(For `install`) Specifies a base directory (e.g., `~/.local`) where uv will be installed, typically into a `bin` subdirectory within the prefix.
DESCRIPTION
uv-self is a specialized subcommand within the uv command-line tool, a groundbreaking, high-performance Python package installer and resolver developed by Astral. Unlike other uv subcommands that focus on managing Python project environments and their dependencies (such as `uv pip install` or `uv venv`), uv-self is exclusively dedicated to the self-management of the uv executable itself. It offers a suite of functionalities designed to streamline the lifecycle of your uv installation, enabling users to easily update uv to its latest version, install uv into a user's system PATH, and cleanly uninstall it when no longer needed. This self-management capability ensures that users can effortlessly maintain their uv installation without resorting to manual downloads, complex compilation steps, or intricate path manipulations. It guarantees access to the most recent features, performance enhancements, and critical bug fixes, embodying a modern approach to command-line tool maintenance.
CAVEATS
`uv self` commands typically require write permissions to the installation directory.
Using `--path` or `--prefix` for installation might require manual addition of the directory to your system's `PATH` environment variable if not already included.
Updating via `--tag` or `--branch` might lead to less stable versions than the default latest stable release, and could potentially introduce breaking changes.
SUBCOMMANDS OVERVIEW
The `uv self` command operates through several dedicated subcommands:
`uv self update`:
Updates the installed uv executable to the latest available stable version, or a specific tag/branch if specified via options. This is the primary method for keeping your uv installation current and secure.
`uv self install`:
Installs the uv executable to a chosen directory, typically one that is part of your system's `PATH`, making it globally available. It can be used for initial installations or to install specific versions.
`uv self uninstall`:
Removes an existing uv executable from your system, cleaning up the installed files. This command helps in safely managing multiple uv installations or removing it entirely.
HISTORY
`uv` is a relatively new project, first released by Astral in late 2023. It quickly gained significant attention for its speed and efficiency, attributed to its implementation in Rust. The `self` subcommand was integrated from early versions, reflecting a modern trend in CLI tools (like Rust's `cargo` or Homebrew's `brew`) to provide convenient self-update capabilities directly within the tool. This design choice simplifies maintenance for users, ensuring they can effortlessly keep their uv installation current. Its development is rapid and ongoing, with frequent releases enhancing both core functionality and self-management features.