WindowsmacOSLinux

Where Does Cargo Store Crates and Toolchains?

Cargo ~/.cargo registry cache plus rustup toolchains folder on Windows, macOS and Linux.

Last updated

Cargo keeps downloaded crates in a registry cache under .cargo in your home folder, with the git checkouts beside it. rustup toolchains live in .rustup next door.

CARGO_HOME and RUSTUP_HOME relocate both. Disk hungry Rust installs are almost always old toolchains plus registry src copies.

Where Cargo (Rust) stores this, by platform

Windows
%USERPROFILE%\.cargo\registry

Toolchains under %USERPROFILE%\.rustup\toolchains. The cache subcommand reports sizes before you prune.

macOS
~/.cargo/registry

Same layout. Toolchain uninstall command drops versions you no longer target.

Linux
~/.cargo/registry

Same layout. Registry src copies are read only; let cargo manage them instead of editing in place.

Frequently asked questions

How do I free Rust disk space safely?

Remove unused toolchains and run the cargo cache cleanup. Registry caches re download on next build.

Where are my Rust binaries from install?

In .cargo/bin on PATH. The registry folder holds dependency sources, not your compiled programs.

Notice an outdated path? Let us know.