Skip to content

clovu/cargo-clean-global

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargo-clean-global

cargo-clean-global is a Cargo plugin that finds Cargo projects on your machine and cleans their build output directories in one command.

It is designed as the practical equivalent of a global Cargo clean operation. Because Cargo plugins cannot extend the built-in cargo clean command with a --global flag, this project is used as:

cargo clean-global

Direct execution via cargo-clean-global is intentionally rejected. Use the Cargo subcommand form only.

Installation

cargo install cargo-clean-global

Install from a local checkout during development:

cargo install --path .

Usage

Clean all discovered Cargo project build directories:

cargo clean-global

Skip the confirmation prompt and clean immediately:

cargo clean-global --yes

Preview what would be cleaned without deleting anything:

cargo clean-global --dry-run

Restrict scanning to a specific directory:

cargo clean-global --root ~/projects

Restrict scanning to multiple directories:

cargo clean-global --root ~/projects --root /work/rust

By default, scanner skips hidden directories whose names start with .. If your Rust project is inside a hidden directory, explicitly pass that path with --root.

Example:

cargo clean-global --root ~/.config/my-rust-projects

Show help:

cargo clean-global --help

Contribution

Contributions of any kind are welcome! If you have ideas or suggestions, feel free to open an issue or submit a pull request.

Release Automation

Pushing a version tag that matches v<package-version> runs the release workflow, builds the release artifacts, creates the GitHub Release, and publishes the crate to crates.io.

Repository maintainers must configure the CRATES_IO_TOKEN GitHub Actions secret before using this flow.

License

MIT License © 2026 Clover You

About

A safe Cargo plugin that cleans target directories across local Cargo projects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages