1CARGO-UPDATE(1)                                                CARGO-UPDATE(1)
2
3
4

NAME

6       cargo-update - Update dependencies as recorded in the local lock file
7

SYNOPSIS

9       cargo update [OPTIONS]
10

DESCRIPTION

12       This command will update dependencies in the Cargo.lock file to the
13       latest version. It requires that the Cargo.lock file already exists as
14       generated by commands such as cargo-build(1) or
15       cargo-generate-lockfile(1).
16

OPTIONS

18   Update Options
19       -p SPEC..., --package SPEC...
20           Update only the specified packages. This flag may be specified
21           multiple times. See cargo-pkgid(1) for the SPEC format.
22
23           If packages are specified with the -p flag, then a conservative
24           update of the lockfile will be performed. This means that only the
25           dependency specified by SPEC will be updated. Its transitive
26           dependencies will be updated only if SPEC cannot be updated without
27           updating dependencies. All other dependencies will remain locked at
28           their currently recorded versions.
29
30           If -p is not specified, all dependencies are updated.
31
32       --aggressive
33           When used with -p, dependencies of SPEC are forced to update as
34           well. Cannot be used with --precise.
35
36       --precise PRECISE
37           When used with -p, allows you to specify a specific version number
38           to set the package to. If the package comes from a git repository,
39           this can be a git revision (such as a SHA hash or tag).
40
41       --dry-run
42           Displays what would be updated, but doesn’t actually write the
43           lockfile.
44
45   Display Options
46       -v, --verbose
47           Use verbose output. May be specified twice for "very verbose"
48           output which includes extra output such as dependency warnings and
49           build script output. May also be specified with the term.verbose
50           config value
51           <https://doc.rust-lang.org/cargo/reference/config.html>.
52
53       -q, --quiet
54           No output printed to stdout.
55
56       --color WHEN
57           Control when colored output is used. Valid values:
58
59           ·   auto (default): Automatically detect if color support is
60               available on the terminal.
61
62           ·   always: Always display colors.
63
64           ·   never: Never display colors.
65
66           May also be specified with the term.color config value
67           <https://doc.rust-lang.org/cargo/reference/config.html>.
68
69   Manifest Options
70       --manifest-path PATH
71           Path to the Cargo.toml file. By default, Cargo searches in the
72           current directory or any parent directory for the Cargo.toml file.
73
74       --frozen, --locked
75           Either of these flags requires that the Cargo.lock file is
76           up-to-date. If the lock file is missing, or it needs to be updated,
77           Cargo will exit with an error. The --frozen flag also prevents
78           Cargo from attempting to access the network to determine if it is
79           out-of-date.
80
81           These may be used in environments where you want to assert that the
82           Cargo.lock file is up-to-date (such as a CI build) or want to avoid
83           network access.
84
85       --offline
86           Prevents Cargo from accessing the network for any reason. Without
87           this flag, Cargo will stop with an error if it needs to access the
88           network and the network is not available. With this flag, Cargo
89           will attempt to proceed without the network if possible.
90
91           Beware that this may result in different dependency resolution than
92           online mode. Cargo will restrict itself to crates that are
93           downloaded locally, even if there might be a newer version as
94           indicated in the local copy of the index. See the cargo-fetch(1)
95           command to download dependencies before going offline.
96
97           May also be specified with the net.offline config value
98           <https://doc.rust-lang.org/cargo/reference/config.html>.
99
100   Common Options
101       -h, --help
102           Prints help information.
103
104       -Z FLAG...
105           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
106           details.
107

ENVIRONMENT

109       See the reference
110       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
111       for details on environment variables that Cargo reads.
112

EXIT STATUS

114       0
115           Cargo succeeded.
116
117       101
118           Cargo failed to complete.
119

EXAMPLES

121        1. Update all dependencies in the lockfile:
122
123               cargo update
124
125        2. Update only specific dependencies:
126
127               cargo update -p foo -p bar
128
129        3. Set a specific dependency to a specific version:
130
131               cargo update -p foo --precise 1.2.3
132

SEE ALSO

134       cargo(1), cargo-generate-lockfile(1)
135
136
137
138                                  2019-06-07                   CARGO-UPDATE(1)
Impressum