CARGO-MACHETE(1)
π CARGO-MACHETE(1) π
okay bestie, welcome to the User Commands section, this is cargo-machete, and she is that girl π
β¨ NAME β¨
cargo-machete β find unused dependencies in Rust projects π¦
β¨ SYNOPSIS β¨
cargo-machete [OPTIONS] [PATH]
β¨ DESCRIPTION β¨
so cargo-machete is the bestie who goes through your Rust project and finds the unused dependencies for you, and she does it fast but also imprecise β like, she's not a perfectionist, she's a vibe, and honestly? iconic behavior π
run her in a directory that has one or more Rust projects using Cargo for dependency management. if you don't hand her any paths at all, she just defaults to the current working directory, no questions asked, main character energy fr fr β¨
β¨ OPTIONS β¨
--with-metadataβ this one usescargo-metadatato figure out what the dependencies are actually named. lowkey a lifesaver if some deps got renamed from their ownCargo.tomlfile (say it with me:xml-rswhich gets renamed toxmlπ). try it if you keep getting false positives, bestie!--skip-target-dirβ does NOT analyze anything chillin' inside anytarget/directories she runs into. respect the target dir, she's not going there π«--fixβ rewrites theCargo.tomlfiles and automatically removes the unused dependencies for you. so generous. so helpful. π
β οΈ okay queen, hear me: all dependencies flagged by cargo-machete get removed, and that includes the false positives. she is not double-checking. the vibes are the vibes π
--no-ignoreβ also searches in ignored files (.gitignore,.ignore, etc.) when she's out here searching for files. nothing escapes her π΅οΈββοΈ--versionβ prints the version. simple. slay.--help,helpβ displays usage information, the classic π«Ά
β¨ EXIT STATUS β¨
cargo-machete returns these exit codes and you will respect them:
0β when no unused dependencies are found π clean, immaculate, no notes1β when at least one unused (non-ignored) dependency is found π she caught one2β on error π something went wrong bestie
β¨ AUTHOR β¨
this manual page was written by Ching He <heqing@rool.me> for the Debian project (and may be used by others) π«Ά
and that's the whole thing, bestie! πΈ this page is from cargo-machete in the User Commands section, dated June 2026 β no cap, go forth and delete those unused deps πβ¨π
π¦ where this page comes from
- ubuntu stonking: cargo-machete 0.9.2-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms