macOS
brew install cargo-shearlocal Homebrew formula metadata
brew
Detect and remove unused dependencies from Cargo.toml in Rust projects. Version 1.13.1 via Homebrew; verified 2026-06-06.
install
brew install cargo-shearlocal Homebrew formula metadata
nix profile install nixpkgs#cargo-shearnixpkgs package indexes · pkgs/by-name/ca/cargo-shear/package.nix · source: api.github.com
winget install --id Boshen.cargo-shear -eWindows Package Manager source index · Boshen.cargo-shear · source: cdn.winget.microsoft.com
overview
Detect and remove unused dependencies from Cargo.toml in Rust projects
history
cargo-shear is a Rust Cargo subcommand for detecting and optionally fixing unused or misplaced dependencies and unlinked source files.
The GitHub repository was created in March 2024 and the first crates.io release appeared the next day. The README describes the tool as feature-complete, with ongoing work focused on bug fixes, dependency upgrades, and UI/UX improvements.
Despite being newer than the other tools in this batch, crates.io metadata showed many releases by 2026 and package facts list Homebrew, Nix, and winget packages. The README includes CI examples and machine-readable JSON output for automation.
Users run cargo shear to check for issues, cargo shear --fix to remove unused dependencies, --deny-warnings for strict CI, --format=json for structured output, and --expand with nightly when macro expansion is needed.
It is part of the Rust ecosystem's dependency-hygiene tooling, sitting near cargo-udeps and cargo-machete but using rust-analyzer parsing and Cargo metadata to find unused dependencies without compiling in the default mode.
security posture
No matching local secret-handling manifest was found for cargo-shear. Nucleus package metadata is still published here so future coverage has a stable package URL.
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
Cargo.tomlexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cargo-shear | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/Boshen/cargo-shear
install metadata
| Package key | brew:cargo-shear |
|---|---|
| Version | 1.13.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/cargo-shear |
| Homepage | https://github.com/Boshen/cargo-shear |
| Repository | https://github.com/Boshen/cargo-shear |
| Upstream docs | https://github.com/Boshen/cargo-shear#readme |
| License | MIT |
| Source archive | https://github.com/Boshen/cargo-shear/archive/refs/tags/v1.13.1.tar.gz |
| Last updated | 2026-06-06T20:42:23Z |
| Pulse | updated |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cargo-shear |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
cargo-shear
nix profile install nixpkgs#cargo-shearBoshen.cargo-shear
winget install --id Boshen.cargo-shear -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.