LinuxCommandLibrary

uv-remove

Remove installed Python packages

TLDR

Remove a dependency from the project

$ uv remove [package]
copy

Remove multiple dependencies
$ uv remove [package1] [package2]
copy

Remove a development dependency
$ uv remove --dev [package]
copy

Remove a dependency from an optional dependency group
$ uv remove --optional [extra_name] [package]
copy

Remove a dependency from a specific dependency group
$ uv remove --group [group_name] [package]
copy

Remove without syncing the virtual environment
$ uv remove --no-sync [package]
copy

SYNOPSIS

uv pip uninstall [OPTIONS] <PACKAGE>...

PARAMETERS

PACKAGE
    The name(s) of the Python package(s) to remove. Multiple packages can be specified.

-y, --yes
    Do not ask for confirmation of uninstall. Proceed directly.

-p , --python
    Use a specific Python interpreter (e.g., /usr/bin/python3.9) to determine the environment for uninstallation.

--editable
    Treat a path as an editable installation to uninstall it.

-v, --verbose
    Enable verbose output, showing more details about the uninstallation process.

--dry-run
    Perform a trial run with no changes made, showing what would be uninstalled.

--help
    Print help information and exit.

DESCRIPTION

The command uv-remove is not a standard, standalone Linux command. It almost certainly refers to the uv pip uninstall subcommand, which is part of the uv toolchain. uv is a modern, high-performance package installer and resolver designed as a faster and more robust alternative to Python's traditional pip and venv tools.

When invoked as uv pip uninstall (or its assumed alias uv-remove), it efficiently removes specified Python packages from the current Python environment or a designated environment. It handles package removal, ensuring that the environment remains consistent. Its primary advantage lies in its speed, leveraging Rust-based performance, and its enhanced resolver capabilities for dependency management, making it a powerful replacement for pip uninstall.

CAVEATS

The command "uv-remove" is not a standard Linux command and almost certainly refers to uv pip uninstall. Users must install the uv tool separately. uv is a relatively new project and, while stable, is under active development. Always ensure you understand its impact on your Python environment, especially in production systems.

ENVIRONMENT CONTEXT

uv pip uninstall operates on the active Python environment by default. If you use virtual environments, activate the correct one before running the command, or specify the Python interpreter using the --python option to target a specific environment.

DEPENDENCY HANDLING

Similar to pip uninstall, uv pip uninstall primarily removes the specified package. It generally does not automatically remove dependencies of the uninstalled package unless those dependencies were solely installed by and for the package being removed, and no other installed package requires them. Manual removal of orphaned dependencies might occasionally be necessary.

HISTORY

The uv project was initiated by Astral, aiming to provide a next-generation toolchain for Python packaging. It emerged as a response to the perceived slowness and complexities of existing tools like pip and venv. Written in Rust, uv quickly gained traction for its unparalleled speed in dependency resolution and package management. It's designed to be a modern, drop-in replacement for many common pip and venv operations.

SEE ALSO

uv(1), uv pip install(1), uv pip list(1), pip(1), venv(1)

Copied to clipboard