Skip to content

cargo uninstall doesn't uninstall #5916

@brson

Description

@brson

When in a source directory, I expect cargo uninstall to remove the compiled package from ~/.cargo/bin. It doesn't seem to do so.

In this example I start with no uutils, cargo install, have uutils, cargo uninstall, still have uutils:

brian@DESKTOP-UCV672I:~/coreutils⟫ ls ~/.cargo/bin
basic-http-server  cargo-benchcmp  cargo-fuzz      cargo-upgrade  mdbook  rustc    rustfmt-format-diff  rustup  wasm2es6js                wasm-pack
cargo              cargo-clippy    cargo-generate  comrak         rg      rustdoc  rust-gdb             tokei   wasm-bindgen
cargo-add          cargo-fmt       cargo-rm        git-fmt        rls     rustfmt  rust-lldb            twiggy  wasm-bindgen-test-runner
brian@DESKTOP-UCV672I:~/coreutils⟫ cargo +nightly install
warning: To build the current package use `cargo build`, to install the current package run `cargo install --path .`
  Installing uutils v0.0.1 (file:///home/brian/coreutils)
    Finished release [optimized] target(s) in 0.95s
  Installing /home/brian/.cargo/bin/uutils
brian@DESKTOP-UCV672I:~/coreutils⟫ ls ~/.cargo/bin
basic-http-server  cargo-benchcmp  cargo-fuzz      cargo-upgrade  mdbook  rustc    rustfmt-format-diff  rustup  uutils        wasm-bindgen-test-runner
cargo              cargo-clippy    cargo-generate  comrak         rg      rustdoc  rust-gdb             tokei   wasm2es6js    wasm-pack
cargo-add          cargo-fmt       cargo-rm        git-fmt        rls     rustfmt  rust-lldb            twiggy  wasm-bindgen
brian@DESKTOP-UCV672I:~/coreutils⟫ cargo +nightly uninstall
brian@DESKTOP-UCV672I:~/coreutils⟫ ls ~/.cargo/bin
basic-http-server  cargo-benchcmp  cargo-fuzz      cargo-upgrade  mdbook  rustc    rustfmt-format-diff  rustup  uutils        wasm-bindgen-test-runner
cargo              cargo-clippy    cargo-generate  comrak         rg      rustdoc  rust-gdb             tokei   wasm2es6js    wasm-pack
cargo-add          cargo-fmt       cargo-rm        git-fmt        rls     rustfmt  rust-lldb            twiggy  wasm-bindgen

Tested on stable and nightly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions