cargo

Rust cargo clean

Preview removal of generated build artifacts. Use only a lab-owned target directory; a real clean discards cached build products. Example format: shell. Run in a disposable copy of v16/fixtures/projects/profile-demo. Expected result (not executed): A preview of generated paths, with no deletion. Common mistake: Cleaning a shared target directory to fix a source error.

Formal Syntax & Structure

rust syntaxrust
cargo clean [OPTIONS]

Working Example

Example Snippetrust
cargo clean --dry-run --verbose
Rust Reference