Check out example codes for "how to uninstall rust". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

rustup self uninstall

Learn ReactJs, React Native from akashmittal.com