1CARGO-YANK(1) General Commands Manual CARGO-YANK(1)
2
3
4
6 cargo-yank - Remove a pushed crate from the index
7
9 cargo yank [options] crate@version
10 cargo yank [options] --version version [crate]
11
13 The yank command removes a previously published crate's version from
14 the server's index. This command does not delete any data, and the
15 crate will still be available for download via the registry's download
16 link.
17
18 Note that existing crates locked to a yanked version will still be able
19 to download the yanked version to use it. Cargo will, however, not
20 allow any new crates to be locked to any yanked version.
21
22 This command requires you to be authenticated with either the --token
23 option or using cargo-login(1).
24
25 If the crate name is not specified, it will use the package name from
26 the current directory.
27
29 Yank Options
30 --vers version, --version version
31 The version to yank or un-yank.
32
33 --undo
34 Undo a yank, putting a version back into the index.
35
36 --token token
37 API token to use when authenticating. This overrides the token
38 stored in the credentials file (which is created by
39 cargo-login(1)).
40
41 Cargo config
42 <https://doc.rust-lang.org/cargo/reference/config.html> environment
43 variables can be used to override the tokens stored in the
44 credentials file. The token for crates.io may be specified with the
45 CARGO_REGISTRY_TOKEN environment variable. Tokens for other
46 registries may be specified with environment variables of the form
47 CARGO_REGISTRIES_NAME_TOKEN where NAME is the name of the registry
48 in all capital letters.
49
50 --index index
51 The URL of the registry index to use.
52
53 --registry registry
54 Name of the registry to use. Registry names are defined in Cargo
55 config files
56 <https://doc.rust-lang.org/cargo/reference/config.html>. If not
57 specified, the default registry is used, which is defined by the
58 registry.default config key which defaults to crates-io.
59
60 Display Options
61 -v, --verbose
62 Use verbose output. May be specified twice for "very verbose"
63 output which includes extra output such as dependency warnings and
64 build script output. May also be specified with the term.verbose
65 config value
66 <https://doc.rust-lang.org/cargo/reference/config.html>.
67
68 -q, --quiet
69 Do not print cargo log messages. May also be specified with the
70 term.quiet config value
71 <https://doc.rust-lang.org/cargo/reference/config.html>.
72
73 --color when
74 Control when colored output is used. Valid values:
75
76 • auto (default): Automatically detect if color support is
77 available on the terminal.
78
79 • always: Always display colors.
80
81 • never: Never display colors.
82
83 May also be specified with the term.color config value
84 <https://doc.rust-lang.org/cargo/reference/config.html>.
85
86 Common Options
87 +toolchain
88 If Cargo has been installed with rustup, and the first argument to
89 cargo begins with +, it will be interpreted as a rustup toolchain
90 name (such as +stable or +nightly). See the rustup documentation
91 <https://rust-lang.github.io/rustup/overrides.html> for more
92 information about how toolchain overrides work.
93
94 --config KEY=VALUE or PATH
95 Overrides a Cargo configuration value. The argument should be in
96 TOML syntax of KEY=VALUE, or provided as a path to an extra
97 configuration file. This flag may be specified multiple times. See
98 the command-line overrides section
99 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
100 for more information.
101
102 -h, --help
103 Prints help information.
104
105 -Z flag
106 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
107 details.
108
110 See the reference
111 <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
112 for details on environment variables that Cargo reads.
113
115 • 0: Cargo succeeded.
116
117 • 101: Cargo failed to complete.
118
120 1. Yank a crate from the index:
121
122 cargo yank foo@1.0.7
123
125 cargo(1), cargo-login(1), cargo-publish(1)
126
127
128
129 CARGO-YANK(1)