rustup
is a utility used to install and remove rust toolchain.
To list the current installed toolchain run:
kenno@c2:~$ rustup show
Default host: aarch64-unknown-linux-gnu
rustup home: /home/kenno/.rustup
installed toolchains
--------------------
stable-aarch64-unknown-linux-gnu (default)
1.70.0-aarch64-unknown-linux-gnu
1.71.1-aarch64-unknown-linux-gnu
1.72.0-aarch64-unknown-linux-gnu
active toolchain
----------------
stable-aarch64-unknown-linux-gnu (default)
rustc 1.72.0 (5680fa18f 2023-08-23)
To remove a specific version of the toolchain, e.g. 1.70.0-aarch64-unknown-linux-gnu
run:
kenno@c2:~$ rustup toolchain remove 1.70.0-aarch64-unknown-linux-gnu
info: uninstalling toolchain '1.70.0-aarch64-unknown-linux-gnu'
info: toolchain '1.70.0-aarch64-unknown-linux-gnu' uninstalled
Let’s verify:
kenno@c2:~$ rustup show
Default host: aarch64-unknown-linux-gnu
rustup home: /home/kenno/.rustup
installed toolchains
--------------------
stable-aarch64-unknown-linux-gnu (default)
1.71.1-aarch64-unknown-linux-gnu
1.72.0-aarch64-unknown-linux-gnu
active toolchain
----------------
stable-aarch64-unknown-linux-gnu (default)
rustc 1.72.0 (5680fa18f 2023-08-23)
To install udpate the new toolchain, run:
kenno@c2:~$ rustup update
info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
warning: Signature verification failed for 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
info: latest update on 2023-10-05, rust version 1.73.0 (cc66ad468 2023-10-03)
info: downloading component 'cargo'
7.5 MiB / 7.5 MiB (100 %) 2.6 MiB/s in 3s ETA: 0s
info: downloading component 'clippy'
2.4 MiB / 2.4 MiB (100 %) 2.3 MiB/s in 1s ETA: 0s
info: downloading component 'rust-docs'
13.8 MiB / 13.8 MiB (100 %) 2.7 MiB/s in 6s ETA: 0s
info: downloading component 'rust-std'
29.9 MiB / 29.9 MiB (100 %) 2.9 MiB/s in 11s ETA: 0s
info: downloading component 'rustc'
76.5 MiB / 76.5 MiB (100 %) 2.4 MiB/s in 33s ETA: 0s
info: downloading component 'rustfmt'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'cargo'
7.5 MiB / 7.5 MiB (100 %) 4.9 MiB/s in 1s ETA: 0s
info: installing component 'clippy'
info: installing component 'rust-docs'
13.8 MiB / 13.8 MiB (100 %) 894.4 KiB/s in 23s ETA: 0s
info: installing component 'rust-std'
29.9 MiB / 29.9 MiB (100 %) 3.9 MiB/s in 11s ETA: 0s
info: installing component 'rustc'
76.5 MiB / 76.5 MiB (100 %) 3.3 MiB/s in 25s ETA: 0s
info: installing component 'rustfmt'
info: checking for self-updates
info: downloading self-update
stable-aarch64-unknown-linux-gnu updated - rustc 1.73.0 (cc66ad468 2023-10-03) (from rustc 1.65.0 (897e37553 2022-11-02))
info: cleaning up downloads & tmp directories