CARGO-UNINSTALL(1)
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:
--rootoptionCARGO_INSTALL_ROOTenvironment variableinstall.rootCargo config value βhttps://doc.rust-lang.org/cargo/reference/config.htmlCARGO_HOMEenvironment variable$HOME/.cargo
order matters fr fr, it checks them top to bottom π
πΈ OPTIONS πΈ
π Uninstall Options π
-p,--packagespecβ¦ β the package to uninstall π--binnameβ¦ β only uninstall the binary name. picky, and honestly? valid π--rootdir β 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 theterm.verboseconfig value βhttps://doc.rust-lang.org/cargo/reference/config.html-q,--quietβ do not print cargo log messages π€« may also be specified with theterm.quietconfig value βhttps://doc.rust-lang.org/cargo/reference/config.html--colorwhen β 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 tocargobegins with+, it'll be interpreted as a rustup toolchain name (like+stableor+nightly) π οΈ see the rustup documentation βhttps://rust-lang.github.io/rustup/overrides.htmlβ for more info about how toolchain overrides work.--config KEY=VALUEorPATHβ overrides a Cargo configuration value π§ the argument should be in TOML syntax ofKEY=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 examplecargo -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-optionsflag 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.-Zflag β unstable (nightly-only) flags to Cargo π runcargo -Z helpfor 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 π
- Uninstall a previously installed package.
cargo uninstall ripgrep
and that's it, bye ripgrep, it was real π«Ά
π« SEE ALSO π«
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
- ubuntu jammy: cargo-1.85 1.85.1+dfsg0ubuntu2~bpo0-0ubuntu1.22.04.1 Β· Apache-2.0 WITH LLVM exception
- ubuntu noble: cargo-1.85 1.85.1+dfsg0ubuntu2~bpo0-0ubuntu0.24.04.2 Β· Apache-2.0 WITH LLVM exception
- ubuntu questing: cargo-1.85 1.85.1+dfsg0ubuntu2-0ubuntu1
- ubuntu questing: cargo-1.85 1.85.1+dfsg0ubuntu2-0ubuntu1.25.04.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms