Avatar ·

How to completely remove Rust installed via rustup (including all components and cache)?

Hello! I started learning Rust a couple of months ago and installed it using the official `rustup` tool. Now I need to completely clean my system of all Rust traces because I'm temporarily switching to another programming language and want to free up disk space. The problem is that I'm not sure if simply deleting the `~/.rustup` and `~/.cargo` folders will completely clean the system. I already tried removing Rust via `rustup self uninstall`, but some files remained in `~/.cargo/bin`, and I don't know how to safely remove them. Additionally, I'm worried that some environment variables I added to `.bashrc` or `.zshrc` might remain and interfere with other tools. Here's how I installed Rust: ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ```