# Is it safe to delete the target folder in a Rust project?

- URL: https://moreroom.app/folders/project-rust-target
- Item: Rust build folders (target)
- Location: `…/target`
- Verdict: Safe to remove — Rebuilt or re-downloaded automatically when needed.
- Comes back on its own: yes
- Typical size: 500 MB–30 GB per project
- Official command: `cargo clean`
- Source: MoreRoom rules catalogue (2026-10-17), by Yando Pte. Ltd.

## What is it?

Cargo puts everything it compiles in a `target` folder next to `Cargo.toml`: debug and release builds, compiled dependencies and incremental compilation data. It grows quickly and often reaches several GB. Only folders in projects untouched for 30 days are considered.

## What happens if you delete it?

The next `cargo build`, `cargo test` or `cargo run` compiles the project and its dependencies again, which can take several minutes. Source code and `Cargo.lock` are not affected.

## How to remove it properly

Run `cargo clean` in the project (it deletes `target` permanently), or move the folder to the Trash in Finder.

## Before you delete it

If you keep release binaries you built in `target/release`, copy them elsewhere first.
