Symptom
When the last installed tool is removed, uv tool uninstall deletes the tools directory and then its parent if that parent has no other directories. On the default Windows layout that deletes %APPDATA%\uv\uv.toml. The linked issue does not give a thrown error string.
Evidence what you'll see
uv tool dirprints%APPDATA%\uv\tools. Afteruv tool uninstall cowsayon a machine whose%APPDATA%\uvheld onlytools/anduv.toml,Test-Path "$env:APPDATA\uv\uv.toml"isFalse.- The parent-directory check ignored files, so a config file next to
tools/did not keep the parent. - Windows 11, PowerShell, default uv directory locations.
Why it happens
Parent cleanup used recursive deletion after looking only for sibling directories. Pull request 22495 uses non-recursive directory removal for that parent, logs failures at debug level, and applies the same safeguard to Python uninstall.
Affected versions
Windows 11, PowerShell, default uv layout where uv tool dir is %APPDATA%\uv\tools. The linked issue does not name a uv version string in the report body.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- After uninstalling the last tool,
%APPDATA%\uv\uv.tomlstill exists anduv tool listreports no tools.
If it still fails
- The linked issue does not describe deletion of
uv.tomlon0.13.1. Parent cleanup still removes an empty tools directory; it no longer deletes the parent recursively.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it