Skip to content

uv tool uninstall silently aborts after first corrupt tool when uninstalling multiple #19219

@Aditya-PS-05

Description

@Aditya-PS-05

Summary

When uv tool uninstall is called with multi pkg names and the first tool has a missing/corrupt receipt (such as dangling install), uv removes that tool's environment and then returns early, skipping other remaining names. The user sees a "Removed dangling environment for <first>" message and exit code 0, but the remaining tools are not uninstalled.

Code snippet I tried to reproduce it.

aditya@aditya:/tmp/uv-tool-bug$ uv tool install ruff
Resolved 1 package in 750ms
Installed 1 package in 17ms
 + ruff==0.15.12
Installed 1 executable: ruff
warning: `/tmp/uv-tool-bug/bin` is not on your PATH. To use installed tools, run `export PATH="/tmp/uv-tool-bug/bin:$PATH"` or `uv tool update-shell`.
aditya@aditya:/tmp/uv-tool-bug$ uv tool install black
Resolved 7 packages in 688ms
Installed 7 packages in 16ms
 + black==26.3.1
 + click==8.3.3
 + mypy-extensions==1.1.0
 + packaging==26.2
 + pathspec==1.1.1
 + platformdirs==4.9.6
 + pytokens==0.4.1
Installed 2 executables: black, blackd
warning: `/tmp/uv-tool-bug/bin` is not on your PATH. To use installed tools, run `export PATH="/tmp/uv-tool-bug/bin:$PATH"` or `uv tool update-shell`.
aditya@aditya:/tmp/uv-tool-bug$ uv tool list
black v26.3.1
- black
- blackd
ruff v0.15.12
- ruff
aditya@aditya:/tmp/uv-tool-bug$ rm tools/ruff/uv-receipt.toml
aditya@aditya:/tmp/uv-tool-bug$ uv tool uninstall ruff black
Removed dangling environment for `ruff`
aditya@aditya:/tmp/uv-tool-bug$ uv tool list
black v26.3.1
- black
- blackd

If it's valid, let me know I will be happy to open a pr.

Platform

Ubuntu 24.04.2 LTS x86_64

Version

uv 0.11.8 (502d42b 2026-04-28)

Python version

Ubuntu 24.04.2 LTS x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions