CARGO-UNINSTALL(1)

📦
version 1.99.1 · 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, opensuse-leap 16.0

💖 CARGO-UNINSTALL(1) 💖

okay bestie, welcome to the General Commands Manual page for cargo-uninstall — yes, it's giving "uninstall era" and honestly? iconic. 💅


✨ NAME ✨

cargo-uninstall — Remove a Rust binary 🗑️✨


🦋 SYNOPSIS 🦋


---

# 🌸 DESCRIPTION 🌸

so basically this command **removes a package** that you installed with `cargo-install(1)`. the *`spec`* argument is a package ID specification of the package you wanna yeet (see `cargo-pkgid(1)` for the deets). 🫶

by default **all binaries** are removed for a crate, but bestie you can be picky — the `--bin` and `--example` flags let you only remove *particular* binaries. main character selectivity, periodt. 👑

now the installation root — where does cargo even look? it's determined **in order of precedence**, like a little ranking of who matters most:

- the `--root` option
- the `CARGO_INSTALL_ROOT` environment variable
- the `install.root` Cargo config value <https://doc.rust-lang.org/cargo/reference/config.html>
- the `CARGO_HOME` environment variable
- `$HOME/.cargo`

---

# 💜 OPTIONS 💜

## 🎀 Uninstall Options 🎀

- **`-p`, `--package` *spec…*** — package to uninstall. that's the one, girl.
- **`--bin` *name…*** — only uninstall the binary *`name`*.
- **`--root` *dir*** — directory to uninstall packages from.

## 🌈 Display Options 🌈

- **`-v`, `--verbose`** — use verbose output. may be specified **twice** for "very verbose" output, which includes extra output such as dependency warnings and build script output. may also be specified with the `term.verbose` config value <https://doc.rust-lang.org/cargo/reference/config.html>.
- **`-q`, `--quiet`** — do not print cargo log messages. may also be specified with the `term.quiet` config value <https://doc.rust-lang.org/cargo/reference/config.html>.
- **`--color` *when*** — control when colored output is used. valid values:
  - `auto` (**default**): automatically detect if color support is available on the terminal. 🔍
  - `always`: always display colors. 🌈
  - `never`: never display colors. 💀

  may also be specified with the `term.color` config value <https://doc.rust-lang.org/cargo/reference/config.html>.

## ⭐ Common Options ⭐

- **`+toolchain`** — if Cargo has been installed with rustup, and the first argument to `cargo` begins with `+`, it will be interpreted as a rustup toolchain name (such as `+stable` or `+nightly`). see the rustup documentation <https://rust-lang.github.io/rustup/overrides.html> for more information about how toolchain overrides work.
- **`--config` *KEY=VALUE* or *PATH*** — overrides a Cargo configuration value. the argument should be in TOML syntax of `KEY=VALUE`, or provided as a path to an extra configuration file. this flag may be specified **multiple times**. see the command-line overrides section <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> for more information.
- **`-C` *PATH*** — changes the current working directory before executing any specified operations. this affects things like where cargo looks by default for the project manifest (`Cargo.toml`), as well as the directories searched for discovering `.cargo/config.toml`, for example. this option **must appear before the command name**, for example `cargo -C path/to/my-project build`.

  > ⚠️ this option is **only available on the nightly channel** <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and requires the `-Z unstable-options` flag to enable (see #10098 <https://github.com/rust-lang/cargo/issues/10098>). so like, don't come for it on stable, bestie 😭

- **`-h`, `--help`** — prints help information. the classic. 🙈
- **`-Z` *flag*** — unstable (nightly-only) flags to Cargo. run `cargo -Z help` for details.

---

# 🧚 ENVIRONMENT 🧚

see the reference <https://doc.rust-lang.org/cargo/reference/environment-variables.html> for details on environment variables that Cargo reads. 👀

---

# 🔥 EXIT STATUS 🔥

- `0`: Cargo succeeded. slay. ✅
- `101`: Cargo failed to complete. oop. 😭

---

# 🍓 EXAMPLES 🍓

1. Uninstall a previously installed package.

👑 SEE ALSO 👑

cargo(1), cargo-install(1)


and that's the whole page, babes — straight from the General Commands Manual, CARGO-UNINSTALL(1), dated like every good manpage footer out there. go forth and uninstall responsibly 💖✨🎀

📦 where this page comes from