🍺 BREW Explorer

← all formulae

cargo-sweep

brew install cargo-sweep v0.8.0 MIT

Utility for cleaning up unused build files generated by Cargo

16
30-day installs · #7401
53
90-day · #7162
1.4k
365-day · #3296
966
★ GitHub stars · updated 2mo ago

Build dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Utility for cleaning up unused build files generated by Cargo",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:10+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "cargo-sweep",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-05-26T07:25:59Z",
  "github_readme_excerpt": "\u26a0\ufe0f\u26a0\ufe0f Warning: `cargo-sweep` is currently unmaintained. \u26a0\ufe0f\u26a0\ufe0f\n\nThe project has issues and is lacking a dedicated maintainer to contribute and/or review contributions from others.\n\nIf you\u0027re looking for an alternative, check [`cargo-clean-all`](https://github.com/dnlmlr/cargo-clean-all).\n\nIf you want to discuss the possibility of a handover, reach out to one of these two previous maintainers:\n\n1. @jyn514 (\"jyn\" in the Rust-Lang\u0027s Zulip)\n2. @marcospb19 (contact info [here](https://github.com/marcospb19#--contact-info))\n\nOr open an issue.\n\n---\n\n# cargo-sweep\n\n`cargo-sweep` is a Cargo subcommand for deleting old or unused build artifacts from `target/` without doing a full `cargo clean`.\n\nIt is useful when you want to:\n\n- shrink large `target/` directories\n- avoid bloated CI caches\n- clean many Rust projects at once\n\n## Why use it?\n\n`cargo clean` removes everything, `cargo-sweep` lets you clean more selectively.\n\nFor example, you can remove artifacts:\n\n- older than a number of days\n- not built by currently installed toolchains\n- until a `target/` directory drops below a size limit\n\n## Install\n\n```bash\ncargo install cargo-sweep\n```\n\nAfter installation, use it as a Cargo subcommand:\n\n```bash\ncargo sweep --help\n```\n\n## Quick examples\n\nClean artifacts older than 30 days in the current project:\n\n```bash\ncargo sweep --time 30\n```\n\nPreview what would be deleted:\n\n```bash\ncargo sweep --dry-run --time 30\n```\n\nClean artifacts not built by currently installed Rust toolchains:\n\n```bash\ncargo sweep --installed\n```\n\nKeep only artifacts for specific toolchains:\n\n```bash\ncargo sweep --toolchains stable,nightly\n```\n\nShrink `target/` until it is below 10 GiB:\n\n```bash\ncargo sweep --maxsize 10GiB\n```\n\nClean everything in a specific project:\n\n```bash\ncargo sweep --all path/to/project\n```\n\nRecursively sweep all Cargo projects under a directory:\n\n```bash\ncargo sweep --recursive --time 30 path/to/workspace-root\n```\n\n## Timestamp workflow\n\nIf you want to keep only artifacts used after a certain ",
  "github_repo": "holmgr/cargo-sweep",
  "github_stars": 966,
  "github_topics": [],
  "homepage": "https://github.com/holmgr/cargo-sweep",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 16,
  "installs_365d": 1409,
  "installs_90d": 53,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "cargo-sweep",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 7401,
  "rank_365d": 3296,
  "rank_90d": 7162,
  "raw_hash": "0536788b7b0bd272",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/c/cargo-sweep.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "rustup"
  ],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.8.0",
  "versioned_formulae": [],
  "why_use_this": null
}