My laptop ran out of space again. Not from photos or videos. From build output.
A target/ in every Rust crate. A node_modules/ in every web project. A build/ and .dart_tool/ in every Flutter app. None of it matters, and all of it comes back the next time I build. One scan of my code folder found 21.5 GB across 8 projects.
The bash script that missed half of it
For a while I used a small script. Walk the code folder, find a project marker ( Cargo.toml , pubspec.yaml , package.json ), run the clean command, move on.
The problem was "move on". The script stopped at the first marker it found. My Flutter apps have a Rust crate inside them ( rust/ , for native code). The script ran flutter clean on the app and never looked inside. The crate's target/ folder sat there, often bigger than the whole app.
That is not Flutter's fault. flutter clean should not touch a folder it does not own.…