cargo-update (1) - Linux Manuals

cargo-update: Update the package dependencies


cargo-update - Update the package dependencies


cargo update [OPTIONS]


Update dependencies as recorded in the local lock file.

This command requires that a Cargo.lock already exists as generated by cargo build or related commands.

If SPEC is given, then a conservative update of the lockfile will be performed. This means that only the dependency specified by SPEC will be updated. Its transitive dependencies will be updated only if SPEC cannot be updated without updating dependencies. All other dependencies will remain locked at their currently recorded versions.

If PRECISE is specified, then --aggressive must not also be specified. The argument PRECISE is a string representing a precise revision that the package being updated should be updated to. For example, if the package comes from a git repository, then PRECISE would be the exact revision that the repository should be updated to.

If SPEC is not given, then all dependencies will be re-resolved and updated.

For more information about package id specifications, see "cargo help pkgid".


-h, --help
Print this message.
-p SPEC, --package SPEC ...
Package to update.
Force updating all dependencies of <name> as well.
--precise PRECISE
Update a single dependency to exactly PRECISE.
-v, --verbose
Use verbose output.
-q, --quiet
No output printed to stdout.
--color WHEN
Coloring: auto, always, never.


This work is dual-licensed under Apache 2.0 and MIT terms. See COPYRIGHT file in the cargo source distribution.