Search code examples
pythonlinuxpython-packaginguv

Uninstall uv python package installer


I recently installed uv on linux using the command line provided in the documentation:

curl -LsSf https://astral.sh/uv/install.sh | sh

It created an executable in /home/currentuser/.cargo/bin/uv. Now, just out of curiosity, I would like to know how to remove it properly. Is it as simple as deleting a file ? Or is there any script or command line which is cleaner?

Please note that I also tried with pip install/uninstall uv, and it worked perfectly, but the installation path was different.


Solution

  • The official documentation now has complete uninstall instructions:

    # Remove all data that uv has stored
    uv cache clean
    rm -r "$(uv python dir)"
    rm -r "$(uv tool dir)"
    # Remove binaries
    rm ~/.local/bin/uv ~/.local/bin/uvx
    

    If your original installation was a version earlier than 0.5.2 (November 2024), then replace the last line with:

    rm ~/.cargo/bin/uv ~/.cargo/bin/uvx
    

    These instructions cover macOS and Linux. See the documentation for Windows instructions.