1CARGO-YANK(1)               General Commands Manual              CARGO-YANK(1)
2
3
4

NAME

6       cargo-yank - Remove a pushed crate from the index
7

SYNOPSIS

9       cargo yank [options] crate@version
10       cargo yank [options] --version version [crate]
11

DESCRIPTION

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

OPTIONS

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
76auto (default): Automatically detect if color support is
77               available on the terminal.
78
79always: Always display colors.
80
81never: 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       -h, --help
95           Prints help information.
96
97       -Z flag
98           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
99           details.
100

ENVIRONMENT

102       See the reference
103       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
104       for details on environment variables that Cargo reads.
105

EXIT STATUS

1070: Cargo succeeded.
108
109101: Cargo failed to complete.
110

EXAMPLES

112        1. Yank a crate from the index:
113
114               cargo yank foo@1.0.7
115

SEE ALSO

117       cargo(1), cargo-login(1), cargo-publish(1)
118
119
120
121                                                                 CARGO-YANK(1)
Impressum