summaryrefslogtreecommitdiffstats
path: root/src/doc/man/cargo-remove.md
blob: 0722e6e53de21dd8fdc9525bdb3e56fffa0d4db2 (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
89
90
91
92
# cargo-remove(1)
{{*set actionverb="Remove"}}
{{*set nouns="removes"}}

## NAME

cargo-remove --- Remove dependencies from a Cargo.toml manifest file

## SYNOPSIS

`cargo remove` [_options_] _dependency_...

## DESCRIPTION

Remove one or more dependencies from a `Cargo.toml` manifest.

## OPTIONS

### Section options

{{#options}}

{{#option "`--dev`" }}
Remove as a [development dependency](../reference/specifying-dependencies.html#development-dependencies).
{{/option}}

{{#option "`--build`" }}
Remove as a [build dependency](../reference/specifying-dependencies.html#build-dependencies).
{{/option}}

{{#option "`--target` _target_" }}
Remove as a dependency to the [given target platform](../reference/specifying-dependencies.html#platform-specific-dependencies).
{{/option}}

{{/options}}

### Miscellaneous Options

{{#options}}

{{#option "`--dry-run`" }}
Don't actually write to the manifest.
{{/option}}

{{/options}}

### Display Options

{{#options}}
{{> options-display }}
{{/options}}

### Manifest Options

{{#options}}
{{> options-manifest-path }}

{{> options-locked }}
{{/options}}

### Package Selection

{{#options}}

{{#option "`-p` _spec_..." "`--package` _spec_..." }}
Package to remove from.
{{/option}}

{{/options}}

{{> section-options-common }}

{{> section-environment }}

{{> section-exit-status }}

## EXAMPLES

1. Remove `regex` as a dependency

       cargo remove regex

2. Remove `trybuild` as a dev-dependency

       cargo remove --dev trybuild

3. Remove `nom` from the `x86_64-pc-windows-gnu` dependencies table

       cargo remove --target x86_64-pc-windows-gnu nom

## SEE ALSO
{{man "cargo" 1}}, {{man "cargo-add" 1}}