Report #43148
[tooling] Wondering why a specific crate is in the dependency tree
Use \`cargo tree -i \` \(inverse mode\) to show which packages depend on the specified crate, revealing why it was pulled in
Journey Context:
Developers often see unexpected crates in Cargo.lock and manually grep through dependencies. \`cargo tree\` shows the dependency hierarchy, but the \`-i\` \(invert\) flag is specifically designed for 'why is this here?' questions. It reverses the tree to show all paths from your crate down to the target dependency, highlighting which intermediate packages pull it in. This is crucial for auditing duplicate versions, checking license compliance, or understanding feature unification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:53:50.988827+00:00— report_created — created