rustup-self
Update or uninstall rustup
TLDR
Update rustup
Uninstall rustup
SYNOPSIS
rustup self <SUBCOMMAND>
rustup self install
rustup self uninstall
rustup self update (deprecated)
rustup self --help
PARAMETERS
install
Installs rustup if not present, or updates an existing rustup installation to the latest version. This is the recommended way to update rustup itself.
uninstall
Completely removes rustup and all installed Rust toolchains and components from the system. This action is irreversible and should be used with caution.
update
Deprecated. Use rustup self install instead to update rustup.
-h, --help
Displays help information for rustup-self or its subcommands.
DESCRIPTION
rustup-self is a specialized subcommand of rustup, the official Rust toolchain installer and manager. Its primary purpose is to manage the rustup installation itself, distinct from managing Rust toolchains or individual components. This command handles the lifecycle of the rustup utility, allowing users to perform critical maintenance operations. These operations include updating rustup to its latest stable version, installing rustup for the first time on a new system, or completely uninstalling rustup along with all its managed Rust toolchains and components. By focusing on rustup's own maintenance, it ensures that the core utility remains current and functional, operating independently of the specific Rust compiler (rustc) or package manager (cargo) versions it orchestrates for development.
CAVEATS
Caveats:
1. The update subcommand is deprecated; users should prefer rustup self install for updating rustup.
2. The uninstall command is destructive and removes all Rust-related files managed by rustup. Use with extreme caution.
3. rustup-self manages rustup itself, not the Rust toolchains (e.g., stable, beta, nightly) or components (e.g., rust-src, clippy). Use rustup update or rustup component add for those tasks.
PURPOSE
rustup-self specifically handles the rustup program itself, not the Rust toolchains. This distinction is crucial for understanding its role in the Rust ecosystem.
UPDATING RUSTUP
To update rustup to its latest version, the recommended command is rustup self install. This command intelligently detects if rustup is already installed and performs an update if necessary.
HISTORY
rustup was introduced to provide a robust and easy way to manage multiple Rust toolchains. rustup-self functionality was built-in from early versions to ensure rustup could maintain and update itself, separating its own lifecycle management from the toolchains it orchestrates. The deprecation of rustup self update in favor of rustup self install simplifies the update process by consolidating it with the initial installation command.