CARGO-LOGOUT(1)
💖 hey bestie, this is cargo-logout(1) 💖
okay so you opened the manual page for cargo-logout, straight out of the General Commands Manual, section 1, and honestly? it's a short one. it's giving "quick lil cleanup task" energy and I am obsessed. let's get into it 🫶
✨ NAME ✨
cargo-logout — yeet an API token off your machine, locally 💅
🌸 SYNOPSIS 🌸
cargo logout [options]
🦋 DESCRIPTION 🦋
so what actually happens when you run this? cargo runs a credential provider to remove a saved token. that's the whole vibe. 🎀
for the default cargo:token credential provider, your credentials live in $CARGO_HOME/credentials.toml, and $CARGO_HOME defaults to .cargo inside your home directory. that's where the token was chilling, and that's where it's about to stop chilling. ✨
if a registry has a credential-provider specified, then that one gets used, no questions asked. otherwise, cargo goes through the providers listed in the config value registry.global-credential-providers, and it tries them starting from the end of the list. yes, from the end. backwards. iconic behavior honestly. 🔥
if you don't pass --registry, then the credentials for the default registry get removed. that default is configured by registry.default (docs at https://doc.rust-lang.org/cargo/reference/config.html#registrydefault), and it defaults to https://crates.io/. so like, if you just wanna be logged out of crates.io, you literally don't have to type anything extra. slay. 💜
⚠️ okay important one, no cap: this does NOT revoke the token on the server. it only removes it locally. if you actually need that token revoked revoked, you have to go to the registry's website and follow their instructions. forhttps://crates.io/, head tohttps://crates.io/meto revoke the token. don't skip this step bestie, a live token is a live token 😭
👑 OPTIONS 👑
💖 Logout Options
--registry registry— the name of the registry you wanna use. registry names are defined in Cargo config files (https://doc.rust-lang.org/cargo/reference/config.html). if you don't specify one, the default registry is used, and that default is defined by theregistry.defaultconfig key, which defaults tocrates-io. 🌈
✨ Display Options
-v,--verbose— use verbose output. and here's the fun part: you can pass it twice for "very verbose" output, which throws in extra stuff like dependency warnings and build script output. you can also set this with theterm.verboseconfig value (https://doc.rust-lang.org/cargo/reference/config.html). more words, more info, we love to see it 📢-q,--quiet— do not print cargo log messages. silence. peace. no thoughts, head empty 🍓 may also be specified with theterm.quietconfig value (https://doc.rust-lang.org/cargo/reference/config.html).--color when— controls when colored output gets used. valid values are:auto(default): automatically detect if color support is available on the terminal. it just knows. 🔮always: always display colors. rainbow mode, periodt 🌈never: never display colors. monochrome moment 💀
may also be specified with the term.color config value (https://doc.rust-lang.org/cargo/reference/config.html).
🎀 Common Options
+toolchain— if Cargo was installed with rustup, and the first argument to cargo starts with+, it gets interpreted as a rustup toolchain name (like+stableor+nightly). see the rustup docs athttps://rust-lang.github.io/rustup/overrides.htmlfor more on how toolchain overrides work. pick your fighter ✨--config KEY=VALUEorPATH— overrides a Cargo configuration value. the argument should be TOML syntax ofKEY=VALUE, or a path to an extra configuration file. you can pass this flag multiple times. see the command-line overrides section athttps://doc.rust-lang.org/cargo/reference/config.html#command-line-overridesfor the deets.-C PATH— changes the current working directory before executing any specified operations. this affects stuff like where cargo looks by default for the project manifest (Cargo.toml), and also the directories it searches when discovering.cargo/config.toml. this option must appear before the command name, likecargo -C path/to/my-project build. order matters bestie, don't fight it 🫶
🙈 this option is only available on the nightly channel (https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) and requires the-Z unstable-optionsflag to enable. see issue #10098 athttps://github.com/rust-lang/cargo/issues/10098. so like, not for the faint of heart, but go off 💅
-h,--help— prints help information. the classic. the icon. 👑-Z flag— unstable (nightly-only) flags to Cargo. runcargo -Z helpfor details. 🧚
🌿 ENVIRONMENT 🌿
see the reference at https://doc.rust-lang.org/cargo/reference/environment-variables.html for all the details on the environment variables that Cargo reads. env vars stay winning 💚
⭐ EXIT STATUS ⭐
0: Cargo succeeded. we ate and left no crumbs 🔥101: Cargo failed to complete. it's giving tragedy 😭
💜 EXAMPLES 💜
- Remove the default registry token:
cargo logout
- Remove the token for a specific registry:
cargo logout --registry my-registry
🌸 SEE ALSO 🌸
cargo(1), cargo-login(1) — the whole friend group 🫶
and that's the whole page, bestie! this was cargo-logout(1) from the General Commands Manual — the Cargo manual's own page, and there's no date stamped on this footer so we're just gonna let it be mysterious. now go log out of that registry, you absolute main character 💅✨🎀
📦 where this page comes from
- alpine 3.22: cargo-doc 1.87.0-r1 · Apache-2.0 OR MIT
- alpine 3.23: cargo-doc 1.91.1-r2 · Apache-2.0 OR MIT
- alpine 3.24: cargo-doc 1.96.1-r0 · Apache-2.0 OR MIT
- alpine 3.24: chromium-cargo-doc 1.97.0-r0 · Apache-2.0 OR MIT
- centos-stream 10: cargo 1.99.1-1.el10 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- centos-stream 9: cargo 1.99.1-1.el9 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- debian bookworm: cargo-web 1.96.0+dfsg1-1~deb12u2 · MIT OR Apache-2.0
- debian trixie: cargo-web 1.96.0+dfsg1-1~deb13u1+b1 · MIT OR Apache-2.0
- fedora 43: cargo 1.90.0-1.fc43 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- fedora 43: cargo 1.98.1-1.fc43
- fedora 43: cargo 1.99.0-1.fc43
- fedora 43: cargo 1.99.1-2.fc43 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- fedora 44: cargo 1.94.1-1.fc44 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- fedora 44: cargo 1.98.1-1.fc44
- fedora 44: cargo 1.99.0-1.fc44
- fedora 44: cargo 1.99.1-2.fc44 · (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- nixos 26.05: cargo 1.95.0
- opensuse-leap 16.0: cargo1.86 1.86.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.86 1.86.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.86 1.86.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.86 1.86.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.87 1.87.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.87 1.87.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.87 1.87.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.87 1.87.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.88 1.88.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.88 1.88.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.88 1.88.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.88 1.88.0-160000.2.2 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.89 1.89.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.89 1.89.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.89 1.89.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.89 1.89.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.90 1.90.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.90 1.90.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.90 1.90.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.90 1.90.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.91 1.91.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.91 1.91.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.91 1.91.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.91 1.91.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.92 1.92.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.92 1.92.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.92 1.92.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.92 1.92.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.93 1.93.0-160000.2.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.93 1.93.0-160000.2.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.93 1.93.0-160000.2.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.93 1.93.0-160000.2.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.94 1.94.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.94 1.94.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.94 1.94.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.94 1.94.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.95 1.95.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.95 1.95.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.95 1.95.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.95 1.95.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 · Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 · Apache-2.0 OR MIT
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms