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] --vers version [crate]
10

DESCRIPTION

12       The yank command removes a previously published crate's version from
13       the server's index. This command does not delete any data, and the
14       crate will still be available for download via the registry's download
15       link.
16
17       Note that existing crates locked to a yanked version will still be able
18       to download the yanked version to use it. Cargo will, however, not
19       allow any new crates to be locked to any yanked version.
20
21       This command requires you to be authenticated with either the --token
22       option or using cargo-login(1).
23
24       If the crate name is not specified, it will use the package name from
25       the current directory.
26

OPTIONS

28   Yank Options
29       --vers version
30           The version to yank or un-yank.
31
32       --undo
33           Undo a yank, putting a version back into the index.
34
35       --token token
36           API token to use when authenticating. This overrides the token
37           stored in the credentials file (which is created by
38           cargo-login(1)).
39
40           Cargo config
41           <https://doc.rust-lang.org/cargo/reference/config.html> environment
42           variables can be used to override the tokens stored in the
43           credentials file. The token for crates.io may be specified with the
44           CARGO_REGISTRY_TOKEN environment variable. Tokens for other
45           registries may be specified with environment variables of the form
46           CARGO_REGISTRIES_NAME_TOKEN where NAME is the name of the registry
47           in all capital letters.
48
49       --index index
50           The URL of the registry index to use.
51
52       --registry registry
53           Name of the registry to use. Registry names are defined in Cargo
54           config files
55           <https://doc.rust-lang.org/cargo/reference/config.html>. If not
56           specified, the default registry is used, which is defined by the
57           registry.default config key which defaults to crates-io.
58
59   Display Options
60       -v, --verbose
61           Use verbose output. May be specified twice for "very verbose"
62           output which includes extra output such as dependency warnings and
63           build script output. May also be specified with the term.verbose
64           config value
65           <https://doc.rust-lang.org/cargo/reference/config.html>.
66
67       -q, --quiet
68           No output printed to stdout.
69
70       --color when
71           Control when colored output is used. Valid values:
72
73           ·  auto (default): Automatically detect if color support is
74               available on the terminal.
75
76           ·  always: Always display colors.
77
78           ·  never: Never display colors.
79
80           May also be specified with the term.color config value
81           <https://doc.rust-lang.org/cargo/reference/config.html>.
82
83   Common Options
84       +toolchain
85           If Cargo has been installed with rustup, and the first argument to
86           cargo begins with +, it will be interpreted as a rustup toolchain
87           name (such as +stable or +nightly). See the rustup documentation
88           <https://rust-lang.github.io/rustup/overrides.html> for more
89           information about how toolchain overrides work.
90
91       -h, --help
92           Prints help information.
93
94       -Z flag
95           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
96           details.
97

ENVIRONMENT

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

EXIT STATUS

104       ·  0: Cargo succeeded.
105
106       ·  101: Cargo failed to complete.
107

EXAMPLES

109        1. Yank a crate from the index:
110
111               cargo yank --vers 1.0.7 foo
112

SEE ALSO

114       cargo(1), cargo-login(1), cargo-publish(1)
115
116
117
118                                                                 CARGO-YANK(1)
Impressum