man-pages/man1/cargo-yank.1.html
2021-03-31 01:06:50 +01:00

254 lines
6.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CARGO-YANK</TITLE>
</HEAD><BODY>
<H1>CARGO-YANK</H1>
Section: &nbsp; (1)<BR>Updated: 2020-06-25<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
cargo-yank - Remove a pushed crate from the index
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>cargo yank [</B><I>OPTIONS</I>] --vers <I>VERSION</I> [<I>CRATE</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
The yank command removes a previously published crate's version from the
server's index. This command does not delete any data, and the crate will
still be available for download via the registry's download link.
<P>
Note that existing crates locked to a yanked version will still be able to
download the yanked version to use it. Cargo will, however, not allow any new
crates to be locked to any yanked version.
<P>
This command requires you to be authenticated with either the <B>--token</B> option
or using <B><A HREF="/cgi-bin/man/man2html?1+cargo-login">cargo-login</A></B>(1).
<P>
If the crate name is not specified, it will use the package name from the
current directory.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<A NAME="lbAF">&nbsp;</A>
<H3>Yank Options</H3>
<P>
<B>--vers</B> <I>VERSION</I>
<DL COMPACT><DT id="1"><DD>
The version to yank or un-yank.
</DL>
<P>
<B>--undo</B>
<DL COMPACT><DT id="2"><DD>
Undo a yank, putting a version back into the index.
</DL>
<P>
<B>--token</B> <I>TOKEN</I>
<DL COMPACT><DT id="3"><DD>
API token to use when authenticating. This overrides the token stored in
the credentials file (which is created by <B><A HREF="/cgi-bin/man/man2html?1+cargo-login">cargo-login</A></B>(1)).
<P>
<I>Cargo config</I> &lt;<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>&gt;
environment variables can be
used to override the tokens stored in the credentials file. The token for
crates.io may be specified with the <B>CARGO_REGISTRY_TOKEN</B> environment
variable. Tokens for other registries may be specified with environment
variables of the form <B>CARGO_REGISTRIES_NAME_TOKEN</B> where <B>NAME</B> is the name
of the registry in all capital letters.
</DL>
<P>
<B>--index</B> <I>INDEX</I>
<DL COMPACT><DT id="4"><DD>
The URL of the registry index to use.
</DL>
<P>
<B>--registry</B> <I>REGISTRY</I>
<DL COMPACT><DT id="5"><DD>
Name of the registry to use. Registry names are defined in
<I>Cargo config files</I> &lt;<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>&gt;.
If not specified, the default registry is used, which is defined by the
<B>registry.default</B> config key which defaults to <B>crates-io</B>.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H3>Display Options</H3>
<P>
<B>-v</B>, <B>--verbose</B>
<DL COMPACT><DT id="6"><DD>
Use verbose output. May be specified twice for &quot;very verbose&quot; output which
includes extra output such as dependency warnings and build script output.
May also be specified with the <B>term.verbose</B>
<I>config value</I> &lt;<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>&gt;.
</DL>
<P>
<B>-q</B>, <B>--quiet</B>
<DL COMPACT><DT id="7"><DD>
No output printed to stdout.
</DL>
<P>
<B>--color</B> <I>WHEN</I>
<DL COMPACT><DT id="8"><DD>
Control when colored output is used. Valid values:
<P>
<DL COMPACT><DT id="9"><DD>
&bull;
<B>auto</B> (default): Automatically detect if color support is available on the
terminal.
</DL>
<P>
<DL COMPACT><DT id="10"><DD>
&bull;
<B>always</B>: Always display colors.
</DL>
<P>
<DL COMPACT><DT id="11"><DD>
&bull;
<B>never</B>: Never display colors.
</DL>
<P>
May also be specified with the <B>term.color</B>
<I>config value</I> &lt;<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>&gt;.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H3>Common Options</H3>
<P>
<B>+TOOLCHAIN</B>
<DL COMPACT><DT id="12"><DD>
If Cargo has been installed with rustup, and the first argument to <B>cargo</B>
begins with <B>+</B>, it will be interpreted as a rustup toolchain name (such
as <B>+stable</B> or <B>+nightly</B>).
See the
<I>rustup documentation</I> &lt;<A HREF="https://github.com/rust-lang/rustup/">https://github.com/rust-lang/rustup/</A>&gt;
for more information about how toolchain overrides work.
</DL>
<P>
<B>-h</B>, <B>--help</B>
<DL COMPACT><DT id="13"><DD>
Prints help information.
</DL>
<P>
<B>-Z</B> <I>FLAG</I>...
<DL COMPACT><DT id="14"><DD>
Unstable (nightly-only) flags to Cargo. Run <B>cargo -Z help</B> for
details.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<P>
See
<I>the reference</I> &lt;<A HREF="https://doc.rust-lang.org/cargo/reference/environment-variables.html">https://doc.rust-lang.org/cargo/reference/environment-variables.html</A>&gt;
for
details on environment variables that Cargo reads.
<A NAME="lbAJ">&nbsp;</A>
<H2>EXIT STATUS</H2>
<P>
0
<DL COMPACT><DT id="15"><DD>
Cargo succeeded.
</DL>
<P>
101
<DL COMPACT><DT id="16"><DD>
Cargo failed to complete.
</DL>
<A NAME="lbAK">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
<DL COMPACT><DT id="17"><DD>
1.
Yank a crate from the index:
<P>
<DL COMPACT><DT id="18"><DD>
<PRE>
cargo yank --vers 1.0.7 foo
</PRE>
</DL>
</DL>
<A NAME="lbAL">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+cargo">cargo</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+cargo-login">cargo-login</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+cargo-publish">cargo-publish</A></B>(1)
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="22"><A HREF="#lbAE">OPTIONS</A><DD>
<DL>
<DT id="23"><A HREF="#lbAF">Yank Options</A><DD>
<DT id="24"><A HREF="#lbAG">Display Options</A><DD>
<DT id="25"><A HREF="#lbAH">Common Options</A><DD>
</DL>
<DT id="26"><A HREF="#lbAI">ENVIRONMENT</A><DD>
<DT id="27"><A HREF="#lbAJ">EXIT STATUS</A><DD>
<DT id="28"><A HREF="#lbAK">EXAMPLES</A><DD>
<DT id="29"><A HREF="#lbAL">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:08 GMT, March 31, 2021
</BODY>
</HTML>