First, see what versions you have with this command:
rustup toolchain list
Output (for example):
stable-x86_64-pc-windows-gnu stable-x86_64-pc-windows-msvc nightly-x86_64-pc-windows-gnu nightly-x86_64-pc-windows-msvc (default)
Then remove the named item that you want from the list above (for example):
rustup toolchain remove nightly-x86_64-pc-windows-msvc
And then you may need to look at the default value by running the rustup toolchain list again, the output (here for me: no):
stable-x86_64-pc-windows-gnu stable-x86_64-pc-windows-msvc
and set the desired default value (for example):
rustup default stable-x86_64-pc-windows-gnu
and confirm the result by running the rustup toolchain list , see:
stable-x86_64-pc-windows-gnu (default) stable-x86_64-pc-windows-msvc
When using the rustup toolchain remove nightly the rustup toolchain remove nightly with four elements installed that works only for the rustup toolchain remove nightly nightly-x86_64-pc-windows-gnu if you have several versions installed (even if you run the rustup toolchain remove nightly twice or more:
Now, if you run the rustup toolchain remove nightly output:
info: uninstalling toolchain 'nightly-x86_64-pc-windows-gnu' info: toolchain 'nightly-x86_64-pc-windows-gnu' uninstalled
Run rustup toolchain remove nightly again rustup toolchain remove nightly , output:
info: no toolchain installed for 'nightly-x86_64-pc-windows-gnu'
Hope this helps.
source share