Is it safe to delete ~/.rustup/toolchains?

Review first. Likely recoverable, but it costs you something to get back. Read before you move it.

What it is

The Rust compilers, standard libraries and tools rustup has installed, one folder per toolchain. rustup's documentation says its folder is “used for storing installed toolchains and configuration options”.

Made by
rustup
If you remove it
  • Rust builds stop until the toolchain is installed again, which downloads it: hundreds of megabytes, over an internet connection. rustup 1.29 installed the default toolchain again by itself when rustc next ran.
  • A toolchain other than the default, such as a nightly or a pinned version, has to be installed again by its name.
  • Projects, their code and Cargo's registry are not stored here.
How it comes back

Put Back from Cleanup History while it is in the Trash. Otherwise install it again with rustup: rustup toolchain install stable, or the same command with the name of the toolchain you had instead of stable.

rustup toolchain install stable

The proof

Verified by
  • vendor documentation: The rustup book, “Installation” (https://rust-lang.github.io/rustup/installation/index.html), read 6 Nov 2026, RUSTUP_HOME “is used for storing installed toolchains and configuration options”.
  • Recreation proved in a scratch RUSTUP_HOME and CARGO_HOME on 6 Nov 2026 with rustup 1.29.0: a minimal stable toolchain installed; the toolchains folder deleted; “rustup toolchain install stable” installed it again (exit 0); rustc --version ran (rustc 1.99.1).
  • With the folder deleted, running rustc first also installed the default toolchain again.
  • The real ~/.rustup was not touched.
Checked on
macOS 26.6.2, rustup 1.29.0, rustc 1.99.1
Catalogue
Spaceific's rules.json 1.5.0, 10 Nov 2026. The whole file.

Related

Spaceific shows this rule for this folder in the app, checks it again at the moment you act, and moves only to the Trash, with Put Back. What Spaceific is.