rustup-update
Update the Rust toolchain to latest version
TLDR
Update all installed toolchains and rustup
Install or update a specific toolchain (see rustup help toolchain for more information)
SYNOPSIS
rustup update [OPTIONS] [TOOLCHAIN...]
PARAMETERS
TOOLCHAIN...
Specifies one or more toolchains to update. If omitted, all installed updatable toolchains (like stable, beta, nightly) will be updated.
--force-gc
Forces immediate garbage collection of old and unused toolchains. rustup typically performs this automatically, but this option can be used for an explicit cleanup.
--no-self-update
Prevents rustup from updating itself to a newer version. This can be useful in environments where rustup's binary should remain fixed, such as CI/CD pipelines.
DESCRIPTION
The rustup update command is the primary method for keeping your Rust development environment current. It checks for new versions of all installed official Rust toolchains (e.g., stable, beta, nightly), downloads the latest components, and replaces the old ones. Beyond just toolchains, rustup update also ensures that the rustup utility itself is upgraded to its newest version, providing access to the latest features and bug fixes of the toolchain manager. This command intelligently identifies and updates only what's necessary, making the process efficient. It is essential for accessing the latest Rust features, performance improvements, and security patches.
CAVEATS
Requires an active internet connection to download updates.
The update process can take significant time and consume bandwidth, especially for the first update or major releases.
While rustup is robust, interrupting the update process (e.g., by force-quitting) can lead to an inconsistent state, potentially requiring a reinstallation of affected toolchains or rustup itself.
DEFAULT BEHAVIOR
When invoked without any specific toolchain arguments, rustup update will update all currently installed toolchains that are official releases (e.g., stable, beta, nightly) and also update the rustup binary itself if a new version is available.
OFFLINE UPDATES
rustup update is primarily an online operation. For offline updates, one would typically use rustup-init with pre-downloaded toolchain archives, or set up a local proxy/mirror, which is beyond the scope of a typical rustup update usage.
HISTORY
The rustup tool was developed to streamline the management of Rust toolchains, inspired by similar version managers like nvm and rbenv. The rustup update command has been a core and foundational part of rustup since its early development, essential for keeping Rust installations current without manual uninstallation and reinstallation steps.