The Rustup documentation shows how to install Rust nightly, but not how to remove it.
While the docs do show how to uninstall rustup
entirely, I'd like to keep the stable branch.
How can I uninstall Rust nightly?
Note that I attempted to do the opposite of rustup install nightly
... (rustup uninstall nightly
, rustup remove nightly
& rustup delete nightly
) to no avail.
Even though I read the documentation it wasn't clear that nightly
was a toolchain
, a channel
... or something else.
Uninstall Rust in Windows To uninstall Rust in the Windows operating system, we can run the Rustup installer and select uninstall. Go to the terminal in Windows and get into the directory where you have installed Rust.
Rustup is the official tool used to manage Rust tooling. Not only can it be used to install Rust and keep it updated, it also allows you to seamlessly switch between the stable, beta, and nightly Rust compilers and tooling.
rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated. It makes cross-compiling simpler with binary builds of the standard library for common platforms. And it runs on all platforms Rust supports.
The command you're looking for is:
rustup toolchain remove nightly
remove
and uninstall
both work for this.
For more details see:
rustup help toolchain
You might have more than one nightly toolchain installed. To list all installed toolchains, run rustup show
. The output will look like this:
Default host: x86_64-unknown-linux-gnu rustup home: /home/fpoli/.rustup installed toolchains -------------------- stable-x86_64-unknown-linux-gnu (default) nightly-2018-06-27-x86_64-unknown-linux-gnu nightly-2021-02-24-x86_64-unknown-linux-gnu nightly-2021-09-20-x86_64-unknown-linux-gnu active toolchain ---------------- stable-x86_64-unknown-linux-gnu (default) rustc 1.54.0 (a178d0322 2021-07-26)
Now that you know the installed versions, you can remove them with the following command:
rustup toolchain remove nightly-2018-06-27 nightly-2021-02-24 nightly-2021-09-20
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With