How to uninstall Rust that was installed via rustup?

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?


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

rustup self uninstall

and it worked.


If you pay attention to the message you get while installing, you will find the command you are looking for:

Rust uninstall command