cargo-update(1)

NAME

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

SYNOPSIS

cargo update [options] spec

DESCRIPTION

This command will update dependencies in the Cargo.lock file to the latest version. If the Cargo.lock file does not exist, it will be created with the latest available versions.

OPTIONS

Update Options

Display Options

Manifest Options

Common Options

ENVIRONMENT

See the reference for details on environment variables that Cargo reads.

EXIT STATUS

  • 0: Cargo succeeded.
  • 101: Cargo failed to complete.

EXAMPLES

  1. Update all dependencies in the lockfile:

    cargo update
    
  2. Update only specific dependencies:

    cargo update foo bar
    
  3. Set a specific dependency to a specific version:

    cargo update foo --precise 1.2.3
    

SEE ALSO

cargo(1), cargo-generate-lockfile(1)