Clarify uninstallation docs (#9938)

See https://github.com/astral-sh/uv/issues/9871

> The current instructions first mention removing the binaries, and then
mention a suggestion for removing stored data. The recommended data
removal process involves uv commands that will no longer be available if
the binaries are gone 😄.

I've edited the uninstallation docs to first suggest removing stored
data before removing the uv and uvx binaries.

<img
src="https://github.com/user-attachments/assets/526fcdb3-4fd2-4e04-b895-810cb826aa11"
width="600"/>
This commit is contained in:
my1e5 2024-12-16 18:56:05 +00:00 committed by GitHub
parent e6d7dc5a1a
commit 11b7a6b905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 25 additions and 21 deletions

View File

@ -190,7 +190,21 @@ Then restart the shell or source the shell config file.
## Uninstallation ## Uninstallation
If you need to remove uv from your system, just remove the `uv` and `uvx` binaries: If you need to remove uv from your system, follow these steps:
1. Clean up stored data (optional):
```console
$ uv cache clean
$ rm -r "$(uv python dir)"
$ rm -r "$(uv tool dir)"
```
!!! tip
Before removing the binaries, you may want to remove any data that uv has stored.
2. Remove the uv and uvx binaries:
=== "macOS and Linux" === "macOS and Linux"
@ -205,16 +219,6 @@ If you need to remove uv from your system, just remove the `uv` and `uvx` binari
$ rm $HOME\.local\bin\uvx.exe $ rm $HOME\.local\bin\uvx.exe
``` ```
!!! tip
You may want to remove data that uv has stored before removing the binaries:
```console
$ uv cache clean
$ rm -r "$(uv python dir)"
$ rm -r "$(uv tool dir)"
```
!!! note !!! note
Prior to 0.5.0, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to Prior to 0.5.0, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to