CARGO-UNINSTALL(1)
๐ 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 ๐
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
- ubuntu jammy: cargo-1.89 1.89.0+dfsg~24.04-0ubuntu0.22.04.2 ยท Apache-2.0 WITH LLVM exception
- ubuntu noble: cargo-1.89 1.89.0+dfsg~24.04-0ubuntu0.24.04.2 ยท Apache-2.0 WITH LLVM exception
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms