2025-03-14 21:59:59 -06:00
|
|
|
# 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 clean`
|
|
|
|
|
|
|
|
|
|
- Remove documentation artifacts (the `target/doc` directory):
|
|
|
|
|
|
|
|
|
|
`cargo clean --doc`
|
|
|
|
|
|
|
|
|
|
- Remove release artifacts (the `target/release` directory):
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`cargo clean {{[-r|--release]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Remove artifacts in the directory of the given profile (in this case, `target/debug`):
|
|
|
|
|
|
|
|
|
|
`cargo clean --profile {{dev}}`
|