1CARGO-UNINSTALL(1) General Commands Manual CARGO-UNINSTALL(1)
2
3
4
6 cargo-uninstall — Remove a Rust binary
7
9 cargo uninstall [options] [spec…]
10
12 This command removes a package installed with cargo-install(1). The
13 spec argument is a package ID specification of the package to remove
14 (see cargo-pkgid(1)).
15
16 By default all binaries are removed for a crate but the --bin and
17 --example flags can be used to only remove particular binaries.
18
19 The installation root is determined, in order of precedence:
20
21 • --root option
22
23 • CARGO_INSTALL_ROOT environment variable
24
25 • install.root Cargo config value
26 <https://doc.rust-lang.org/cargo/reference/config.html>
27
28 • CARGO_HOME environment variable
29
30 • $HOME/.cargo
31
33 Install Options
34 -p, --package spec…
35 Package to uninstall.
36
37 --bin name…
38 Only uninstall the binary name.
39
40 --root dir
41 Directory to uninstall packages from.
42
43 Display Options
44 -v, --verbose
45 Use verbose output. May be specified twice for “very verbose”
46 output which includes extra output such as dependency warnings and
47 build script output. May also be specified with the term.verbose
48 config value
49 <https://doc.rust-lang.org/cargo/reference/config.html>.
50
51 -q, --quiet
52 Do not print cargo log messages. May also be specified with the
53 term.quiet config value
54 <https://doc.rust-lang.org/cargo/reference/config.html>.
55
56 --color when
57 Control when colored output is used. Valid values:
58
59 • auto (default): Automatically detect if color support is
60 available on the terminal.
61
62 • always: Always display colors.
63
64 • never: Never display colors.
65
66 May also be specified with the term.color config value
67 <https://doc.rust-lang.org/cargo/reference/config.html>.
68
69 Common Options
70 +toolchain
71 If Cargo has been installed with rustup, and the first argument to
72 cargo begins with +, it will be interpreted as a rustup toolchain
73 name (such as +stable or +nightly). See the rustup documentation
74 <https://rust-lang.github.io/rustup/overrides.html> for more
75 information about how toolchain overrides work.
76
77 --config KEY=VALUE or PATH
78 Overrides a Cargo configuration value. The argument should be in
79 TOML syntax of KEY=VALUE, or provided as a path to an extra
80 configuration file. This flag may be specified multiple times. See
81 the command-line overrides section
82 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
83 for more information.
84
85 -C PATH
86 Changes the current working directory before executing any
87 specified operations. This affects things like where cargo looks by
88 default for the project manifest (Cargo.toml), as well as the
89 directories searched for discovering .cargo/config.toml, for
90 example. This option must appear before the command name, for
91 example cargo -C path/to/my-project build.
92
93 This option is only available on the nightly channel
94 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and
95 requires the -Z unstable-options flag to enable (see #10098
96 <https://github.com/rust-lang/cargo/issues/10098>).
97
98 -h, --help
99 Prints help information.
100
101 -Z flag
102 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
103 details.
104
106 See the reference
107 <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
108 for details on environment variables that Cargo reads.
109
111 • 0: Cargo succeeded.
112
113 • 101: Cargo failed to complete.
114
116 1. Uninstall a previously installed package.
117
118 cargo uninstall ripgrep
119
121 cargo(1), cargo-install(1)
122
123
124
125 CARGO-UNINSTALL(1)