How to uninstall Rust that was installed via rustup?

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


As for Linux based operating systems, the following command can be used:

rustup self uninstall

this will remove all the Rust Compiler, Tool Chains and Data including rustc and cargo If you're one window this should wok, but you have to remove C++ build tools manually if you want to remove it as well, though I would never recommend.

Tags:

Rust

Rustup