# Install cargo-sweep with Homebrew, Nix, pacman

Utility for cleaning up unused build files generated by Cargo. Version 0.8.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:cargo-sweep
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cargo-sweep
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-sweep
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ca/cargo-sweep/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cargo-sweep
```

  Evidence: Arch Linux sync databases: cargo-sweep from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:cargo-sweep
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cargo-sweep>
- **Version:** 0.8.0
- **Source summary:** Utility for cleaning up unused build files generated by Cargo
- **Homepage:** <https://github.com/holmgr/cargo-sweep>
- **Repository:** <https://github.com/holmgr/cargo-sweep>
- **Upstream docs:** <https://docs.rs/crate/cargo-sweep/latest>
- **License:** MIT
- **Source archive:** <https://github.com/holmgr/cargo-sweep/archive/refs/tags/v0.8.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cargo-sweep (cli)
- cargo-sweep (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.8.0
- Local data: ok
- Upstream repository: https://github.com/holmgr/cargo-sweep
- Upstream latest detected: v0.8.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

cargo-sweep is a Cargo subcommand for deleting old or unused build artifacts from target directories without running a full cargo clean.

### Project history

The README describes cargo-sweep as a selective cleanup tool for Cargo build artifacts and currently marks the project as unmaintained while pointing users toward cargo-clean-all as an alternative.

### Adoption history

GitHub records the repository as created in November 2018, and crates.io records the first cargo-sweep release in the same month. The input package facts list Homebrew, Nix, and Arch packages.

### How it is used

The official README documents cleaning by age, installed toolchains, maximum target-directory size, recursive project search, dry-run previews, and a timestamp workflow using `--stamp` and `--file`.

### Why package nerds care

cargo-sweep is notable for Cargo users who accumulate large target directories or CI caches, because it offers narrower cleanup choices than Cargo's built-in `cargo clean`.

### Timeline

- 2018: GitHub repository created and first crates.io release recorded.
- 2025: crates.io records max_version 0.8.0.
- 2026: GitHub repository metadata still shows recent pushes, while the README marks the project unmaintained.

### Related projects

- The README lists Cargo's built-in `cargo clean` and cargo-clean-all as related cleanup tools.

### Sources

- <https://api.github.com/repos/holmgr/cargo-sweep>
- <https://github.com/holmgr/cargo-sweep>
- <https://docs.rs/crate/cargo-sweep/latest>
- <https://github.com/holmgr/cargo-sweep#readme>
- <https://crates.io/api/v1/crates/cargo-sweep>
- <https://formulae.brew.sh/api/formula/cargo-sweep.json>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cargo-sweep
- **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:** head, stable

## Other Package-Manager Records

- Nix - cargo-sweep: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-sweep/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - cargo-sweep - 0.8.0-2: normalized package name match | Arch Linux sync databases: cargo-sweep from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A cargo subcommand for cleaning up unused build files generated by Cargo | https://github.com/holmgr/cargo-sweep


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry command family.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-chef](https://www.automicvault.com/pkg/brew/cargo-chef/) - Package names and metadata indicate a similar tool family. Shared terms: build, cargo, up.
- [cargo-all-features](https://www.automicvault.com/pkg/brew/cargo-all-features/) - Package names and metadata indicate a similar tool family. Shared terms: build, cargo.
- [cargo-sweep](https://www.automicvault.com/pkg/cargo/cargo-sweep/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/cargo-sweep.yml](https://github.com/automic-vault/db/blob/main/combined/cargo-sweep.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
