CARGO-UNINSTALL(1)

πŸ“¦ version 1.85.1, in ubuntu jammy, ubuntu noble, ubuntu questing

CARGO-UNINSTALL(1) πŸ’–

okay bestie, welcome to the General Commands Manual page for cargo-uninstall β€” this is the glow-up guide for yeeting a Rust binary off your machine, no cap ✨


✨ NAME ✨

cargo-uninstall β€” Remove a Rust binary πŸ—‘οΈπŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

cargo uninstall [options] [spec…]

πŸ’œ DESCRIPTION πŸ’œ

so basically, this command removes a package that you installed earlier with cargo-install(1). like, it's the undo button, the "we don't talk about bruno" button, the it's not you it's me button 🫢

the spec argument is a package ID specification of the package you wanna remove β€” see cargo-pkgid(1) if you need the full lore on how those specs work, iykyk πŸ“–βœ¨

by default, all binaries are removed for a crate. but if you're feeling selective (main character energy), the --bin and --example flags let you only remove particular binaries 🎯

now, where does cargo actually go looking for stuff to uninstall? the installation root is determined in order of precedence, so first one that hits wins:

order matters fr fr, it checks them top to bottom πŸ‘‘

🌸 OPTIONS 🌸

πŸŽ€ Uninstall Options πŸŽ€

  • -p, --package spec… β€” the package to uninstall πŸ’–
  • --bin name… β€” only uninstall the binary name. picky, and honestly? valid πŸ“
  • --root dir β€” the directory to uninstall packages from πŸ“

🌈 Display Options 🌈

  • -v, --verbose β€” use verbose output. and yes bestie, you can specify it twice for "very verbose" output, which throws in extra stuff like 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'll be interpreted as a rustup toolchain name (like +stable or +nightly) πŸ› οΈ see the rustup documentation β€” https://rust-lang.github.io/rustup/overrides.html β€” for more info 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 info.
  • -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 if you're on stable, sorry babe, not today 😭
  • -h, --help β€” prints help information πŸ’¬ the classic, the icon, the moment.
  • -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. it's giving not slay πŸ’€

πŸ“ EXAMPLES πŸ“

  1. Uninstall a previously installed package.
cargo uninstall ripgrep

and that's it, bye ripgrep, it was real 🫢


πŸ’« SEE ALSO πŸ’«

cargo(1), cargo-install(1)


k bye bestie, go forth and uninstall responsibly πŸ’– this was CARGO-UNINSTALL(1) from the General Commands Manual β€” same title top and bottom, that's just how manpages do πŸŽ€

πŸ“¦ where this page comes from