How to remove Rust compiler toolchains with Rustup?

ideasman42 picture ideasman42 · Feb 19, 2017 · Viewed 16.9k times · Source

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.

Answer

Michael Jungo picture Michael Jungo · Feb 19, 2017

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