Uses new Rust 2021
|0.1.29||May 20, 2022|
|0.1.27||Feb 25, 2022|
|0.1.25||Dec 10, 2021|
|0.1.24||Oct 22, 2021|
|0.1.5||Sep 27, 2019|
#21 in Cargo plugins
18,361 downloads per month
Find unused dependencies in Cargo.toml.
While compilation of this tool also works on Rust stable, it needs Rust nightly to actually run.
cargo install (crates.io)
cargo install cargo-udeps --locked
cargo install (
cargo install --git https://github.com/est31/cargo-udeps --locked
Some GNU/Linux distros have packaged
- Nix/Nix OS:
- Arch Linux:
pacman -S cargo-udeps
cargo +nightly udeps
It either prints out a "unused crates" line listing the crates, or it prints out a line saying that no crates were unused.
To ignore some of the dependencies, add
[package.metadata.cargo-udeps.ignore] normal = ["if_chain"] #development =  #build =  [dependencies] if_chain = "1.0.0" # Used only in doc-tests, which `cargo-udeps` cannot check.
Some unused crates might not be detected. This includes crates used by std and its dependencies as well as crates that are already being used by dependencies of the studied crate.
Crates are currently only handled on a per name basis. Two crates with the same name but different versions would be a problem.
This is a list of cases where unused dependencies were found using cargo-udeps. You are welcome to expand it:
This tool is distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your option.
See LICENSE for details.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.