WindowsmacOSLinux

Where Does rustup Install Toolchains?

Where rustup installs toolchains and where Cargo binaries land, plus the variables that relocate both.

Last updated

rustup installs toolchains under ~/.rustup/toolchains (RUSTUP_HOME overrides), one folder per channel and version. Cargo keeps its own side in ~/.cargo (CARGO_HOME overrides): installed binaries in bin/, registry cache in registry/. Two homes, two jobs, often confused as one.

rust-toolchain.toml files pin a directory to a toolchain, overriding the default wherever they sit. That file is why identical commands build differently in adjacent folders. rustup override list exposes every directory pin at once for auditing inherited machines.

Where rustup stores this, by platform

Windows
%USERPROFILE%\.rustup\toolchains

Same layout on every OS, home prefix aside. Override with RUSTUP_HOME and CARGO_HOME. Inspect with rustup show and rustup toolchain list. Keep ~/.cargo/bin on PATH.

macOS
~/.rustup/toolchains

Toolchains version in subfolders (stable, nightly, 1.8x). Directory overrides via rust-toolchain.toml beat the default toolchain.

Linux
~/.rustup/toolchains

Same as macOS. rustup self update keeps the proxy current; toolchains update with rustup update.

Frequently asked questions

Which toolchain is actually active right now?

Run rustup show. It lists installed toolchains with the active one starred, plus the active override reason (directory override, rust-toolchain file, or default). rustup which <binary> resolves one tool through the same chain.

How do I remove an old toolchain?

Delete the version folder under toolchains/ (or run rustup toolchain uninstall <name>). Components installed into it go with it. The cargo registry cache in ~/.cargo is separate and survives; clear it with cargo cache via cargo-cache or manual pruning.

Notice an outdated path? Let us know.