How to uninstall Rust that was installed via rustup?

vinzee picture vinzee · Aug 27, 2018 · Viewed 49.5k times · Source

I installed Rust on my Ubuntu 16.04 machine through

curl https://sh.rustup.rs -sSf | sh

as can be seen on the Installation Page.

How do I now uninstall Rust?

Answer

vinzee picture vinzee · Aug 27, 2018

To uninstall rustc, rustup and cargo from my Ubuntu 16.04 installation, I did:

rustup self uninstall

and it worked.