LinuxCommandLibrary

rustup-update

Update the Rust toolchain to latest version

TLDR

Update all installed toolchains and rustup

$ rustup update
copy

Install or update a specific toolchain (see rustup help toolchain for more information)
$ rustup update [toolchain]
copy

SYNOPSIS

rustup update [toolchain]

PARAMETERS

[toolchain]
    Specifies the toolchain to update. If omitted, the default toolchain is updated (usually `stable`). Examples: `stable`, `beta`, `nightly`, `1.65.0`.

--force
    Forces an update even if the toolchain is currently in use. This may require closing applications that use the toolchain.

--no-self-update
    Do not perform rustup's self update before running update.

DESCRIPTION

The `rustup-update` command is a component of `rustup`, the Rust toolchain installer and manager. It's responsible for updating the Rust toolchain to the latest stable, beta, or nightly release, or to a specific version. It checks for updates, downloads the necessary components, and switches the active toolchain. This ensures you are running the most recent version of Rust and its associated tools like `cargo` and `rustc`.

Using `rustup-update` allows users to benefit from bug fixes, performance improvements, and new features in the Rust language and ecosystem. It is typically executed automatically on a scheduled basis but can also be run manually to check for and apply updates immediately. It uses metadata from the Rust distribution channels to determine if updates are available and to download the right packages. The tool downloads the standard library and tools for the configured target platforms.

CAVEATS

Updating while Rust processes are running can lead to errors. Always ensure processes using Rust are closed before running `rustup update`.

TOOLCHAIN CHANNELS

Rust offers different release channels: stable, beta, and nightly.
`rustup-update` automatically updates the channel you have configured to point to the latest release within that channel.
The stable channel receives updates every six weeks, the beta channel mirrors the stable channel six weeks prior to its release, and the nightly channel is updated daily with the latest changes.

SELF-UPDATES

rustup itself needs to be updated periodically.
By default, `rustup update` will first update rustup before updating the toolchain. The `--no-self-update` flag can disable this behaviour.

HISTORY

The `rustup` project was created to simplify the installation and management of the Rust toolchain.
Before `rustup`, installing and updating Rust could be a cumbersome process, especially when needing to manage multiple versions. `rustup-update` evolved as a core component, enabling seamless updates to ensure users benefit from the latest improvements. It has undergone continuous development to enhance its reliability and efficiency.

SEE ALSO

rustup(1), cargo(1), rustc(1)

Copied to clipboard