CARGO-UNINSTALL(1)

πŸ“¦ version 1.78.0, in ubuntu jammy, ubuntu noble

✨ CARGO-UNINSTALL ✨

okay bestie, welcome to the cargo-uninstall page of the General Commands Manual πŸ’… this is the one where we take out the trash (respectfully) and yeet a Rust binary off your machine πŸ—‘οΈβœ¨


🌸 NAME 🌸

cargo-uninstall β€” Remove a Rust binary 🫢


πŸŽ€ SYNOPSIS πŸŽ€

cargo uninstall [options] [spec…]

πŸ¦‹ DESCRIPTION πŸ¦‹

So this command does the reverse-glow-up move: it removes a package that was installed with cargo-install(1). The spec argument is a package ID specification of the package you want to remove β€” go check cargo-pkgid(1) if you need the deets on how those specs work πŸ”

By default, all binaries get removed for a crate, but if you're picky (and you should be, you're a main character), the --bin and --example flags let you remove only particular binaries 🎯

Now, where does it look for the install root? The installation root is determined, in order of precedence:

like, it goes down that list and the first one that hits, wins πŸ†


πŸ’– OPTIONS πŸ’–

🌈 Install Options

  • -p, --package spec… β€” the package you want to uninstall 🫑
  • --bin name… β€” only uninstall the binary name βœ‚οΈ
  • --root dir β€” the directory to uninstall packages from πŸ“

⭐ Display Options

  • -v, --verbose β€” use verbose output. You can pass it 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 are:
    • 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.
⚠️ heads up bestie: 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>) 🚨
  • -h, --help β€” prints help information πŸ†˜
  • -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 βœ…
  • 101: Cargo failed to complete 😭

πŸ“ EXAMPLES πŸ“

  1. Uninstall a previously installed package.
cargo uninstall ripgrep

πŸ‘‘ SEE ALSO πŸ‘‘

cargo(1), cargo-install(1) πŸ’ž


and that's the whole page, no cap 🧚 this was CARGO-UNINSTALL(1) from the General Commands Manual β€” go forth, uninstall responsibly, and remember: removing a binary is still a slay πŸ’…βœ¨

πŸ“¦ where this page comes from