LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-uninstall

Remove a Rust binary installed by cargo install

TLDR

Uninstall package
$ cargo uninstall [package]
copy
Uninstall specific binary
$ cargo uninstall [package] --bin [binary]
copy
Uninstall from custom root
$ cargo uninstall [package] --root [~/.local]
copy
Uninstall multiple packages
$ cargo uninstall [pkg1] [pkg2]
copy

SYNOPSIS

cargo uninstall [options] [spec...]

DESCRIPTION

cargo uninstall removes packages that were previously installed with `cargo install`. By default it removes all binaries associated with the package. The `--bin` flag can be used to remove only a specific binary while leaving others from the same package in place.The installation root is determined by the `--root` flag, the `CARGOINSTALLROOT` environment variable, the `install.root` configuration value, or `$CARGO_HOME` (defaulting to `~/.cargo`). Only the installed binaries are removed; cached build artifacts in the target directory are not cleaned up.

PARAMETERS

-p, --package spec

Package to uninstall
--bin name
Only uninstall specified binary
--example name
Only uninstall specified example
--root dir
Directory to uninstall from
-v, --verbose
Verbose output (use twice for very verbose)
-q, --quiet
Suppress output
--color when
Control colored output: auto, always, or never

INSTALLATION ROOT

Determined by (in order):1. --root option2. CARGOINSTALLROOT environment variable3. install.root config value4. CARGO_HOME environment variable5. ~/.cargo

CAVEATS

Only removes binaries, not cached build artifacts. Package spec can be name or name@version.

SEE ALSO

Copied to clipboard
Kai