Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall Rust that was installed via rustup?

Tags:

rust

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?

like image 346
vinzee Avatar asked Aug 27 '18 19:08

vinzee


People also ask

Where Rust is installed?

In the Rust development environment, all tools are installed to the ~/. cargo/bin. directory, and this is where you will find the Rust toolchain, including rustc , cargo , and rustup . Accordingly, it is customary for Rust developers to include this directory in their PATH environment variable.

How do I check my Rust version?

The version is queried by calling the Rust compiler with --version . The path to the compiler is determined first via the RUSTC environment variable. If it is not set, then rustc is used. If that fails, no determination is made, and calls return None .


2 Answers

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

rustup self uninstall 

and it worked.

like image 77
vinzee Avatar answered Sep 23 '22 08:09

vinzee


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

Rust uninstall command

like image 26
MaNKuR Avatar answered Sep 21 '22 08:09

MaNKuR