snippetbashTip
cargo clean — Remove generated artifacts in the `target` directory. More information: <https://doc.rust-lang.org/c
Viewed 0 times
thecommandremovegeneratedclicargo cleanartifactstarget
Problem
How to use the
cargo clean command: Remove generated artifacts in the target directory. More information: <https://doc.rust-lang.org/cargo/commands/cargo-clean.html>.Solution
cargo clean — Remove generated artifacts in the target directory. More information: <https://doc.rust-lang.org/cargo/commands/cargo-clean.html>.Remove the entire
target directory:cargo cleanRemove documentation artifacts (the
target/doc directory):cargo clean --docRemove release artifacts (the
target/release directory):cargo clean {{[-r|--release]}}Remove artifacts in the directory of the given profile (in this case,
target/debug):cargo clean --profile {{dev}}Code Snippets
Remove the entire `target` directory
cargo cleanRemove documentation artifacts (the `target/doc` directory)
cargo clean --docRemove release artifacts (the `target/release` directory)
cargo clean {{[-r|--release]}}Remove artifacts in the directory of the given profile (in this case, `target/debug`)
cargo clean --profile {{dev}}Context
tldr-pages: common/cargo clean
Revisions (0)
No revisions yet.