blob: 3222f7bb04b3174e7206c8c6c4c728f1d77c46fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# cargo-clean(1)
{{*set actionverb="Clean"}}
{{*set multitarget=true}}
## NAME
cargo-clean --- Remove generated artifacts
## SYNOPSIS
`cargo clean` [_options_]
## DESCRIPTION
Remove artifacts from the target directory that Cargo has generated in the
past.
With no options, `cargo clean` will delete the entire target directory.
## OPTIONS
### Package Selection
When no packages are selected, all packages and all dependencies in the
workspace are cleaned.
{{#options}}
{{#option "`-p` _spec_..." "`--package` _spec_..." }}
Clean only the specified packages. This flag may be specified
multiple times. See {{man "cargo-pkgid" 1}} for the SPEC format.
{{/option}}
{{/options}}
### Clean Options
{{#options}}
{{#option "`--doc`" }}
This option will cause `cargo clean` to remove only the `doc` directory in
the target directory.
{{/option}}
{{#option "`--release`" }}
Remove all artifacts in the `release` directory.
{{/option}}
{{#option "`--profile` _name_" }}
Remove all artifacts in the directory with the given profile name.
{{/option}}
{{> options-target-dir }}
{{> options-target-triple }}
{{/options}}
### Display Options
{{#options}}
{{> options-display }}
{{/options}}
### Manifest Options
{{#options}}
{{> options-manifest-path }}
{{> options-locked }}
{{/options}}
{{> section-options-common }}
{{> section-environment }}
{{> section-exit-status }}
## EXAMPLES
1. Remove the entire target directory:
cargo clean
2. Remove only the release artifacts:
cargo clean --release
## SEE ALSO
{{man "cargo" 1}}, {{man "cargo-build" 1}}
|