Is it safe to delete ~/.cargo/registry?

Rebuildable. Your tools make it again on their own. The cost is a slower next run.

What it is
Crate archives Cargo downloads from crates.io, the sources it unpacks from them, and its copy of the registry index, kept so builds don't fetch them again.
Made by
Cargo
If you remove it
The next build of any Rust project downloads the crates it needs again, that build is slower and needs an internet connection. Compiled output in a project's target folder is not touched.
How it comes back
Run cargo build (or cargo fetch) in any project, Cargo downloads what is missing by itself. A crate version that has since been yanked or removed from the registry may not come back.cargo buildcargo fetch

The proof

Verified by
vendor documentation: The Cargo Book, “Cargo Home”, section “Clearing the cache” (https://doc.rust-lang.org/cargo/guide/cargo-home.html), “you can always remove any part of the cache”. Recreation proved in a scratch CARGO_HOME on 10 Oct 2026 with cargo 1.97.1: registry deleted, cargo build downloaded and unpacked it again.
Checked on
macOS 26.6.2, cargo 1.97.1
Catalogue
Spaceific's rules.json 1.2.0, 2 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.