CleanMate

All guides · macOS · Updated

Flutter, React Native and the iOS Simulator filling your Mac: what to delete

Why Flutter and React Native projects take tens of GB on a Mac: flutter clean, pub cache, Pods, Gradle, Metro, the iOS Simulator and runtimes. What is safe to delete.

Download for macOS — free and open source

CleanMate Smart Scan on a Mac, listing Xcode simulators, the Flutter pub cache and stale build folders with their sizesCleanMate Smart Scan on a Mac, listing Xcode simulators, the Flutter pub cache and stale build folders with their sizes

A mobile developer’s Mac fills from three directions at once: each project builds twice (an iOS build and an Android build), each iOS version you test on adds a simulator, and each Flutter or React Native project carries its own dependencies. A year of work easily reaches 50 to 100 GB.

Almost all of it is rebuilt by the next build, so the question is not whether you can delete it but what you will wait for afterwards. This guide goes from the safest to the most costly.

Inside a project

What Where Next build
Flutter build output build/, .dart_tool/ rebuilds, a few minutes
iOS pods ios/Pods pod install
iOS build ios/build, DerivedData rebuilds
Android build android/build, android/app/build, android/.gradle Gradle rebuilds
React Native dependencies node_modules bun install (or your package manager)
flutter clean            # removes build/ and .dart_tool/ and the ios/android build products
rm -r ios/Pods && (cd ios && pod install)
rm -r android/build android/app/build android/.gradle

flutter clean does not delete the pub cache or your Flutter SDK. For projects you have not opened in months, deleting node_modules, ios/Pods and the build folders is the cheapest win: a single project is often 1 to 3 GB. See stale node_modules and build folders for how to find them all at once.

The Flutter caches and SDKs

du -sh ~/.pub-cache
flutter pub cache clean      # deletes the downloaded packages

~/.pub-cache holds every package version your projects ever used. Deleting it is safe: flutter pub get downloads again. Keep ~/.pub-cache/bin if you installed Dart tools with dart pub global activate, and never touch credentials.json.

Each Flutter SDK that fvm installs is 1 to 2 GB, in ~/fvm/versions. List them and remove the ones no project pins:

fvm list
fvm remove 3.19.6

More on that in old runtime versions.

CocoaPods, Gradle and Metro

The iOS Simulator

This is where most of the surprise sits, and Xcode using too much space goes deeper. In short:

Close Xcode and the Simulator before deleting any of these.

How CleanMate does it

CleanMate’s Smart Scan › Developer Junk lists the items below, each with its size and nothing removed until you confirm (macOS features).

CleanMate does not clean Metro’s temp folders, and it does not delete simulators or your Flutter projects. A project you are working on is never listed as stale. For everything else a Mac developer accumulates, read Free up disk space on a Mac as a developer.

FAQ

Is flutter clean safe? Yes. It removes build output and .dart_tool; your code and pubspec.lock stay. The next flutter run rebuilds, and the first iOS build is slow again.

Can I delete CoreSimulator? Not the whole folder by hand: it holds simulators Xcode still lists, and a broken state means reinstalling runtimes. Erase simulators one at a time, remove unavailable ones with simctl, and delete old runtimes with simctl runtime delete.

Why is my Mac still full after flutter clean? flutter clean only touches one project. The pub cache, Pods, Gradle caches, DerivedData and the simulators are outside it.

Will deleting an old runtime break my project? No project depends on a runtime. You only lose the ability to run that iOS version in the Simulator until you download it again.

Skip the commands

Open source — star it on GitHub: CleanMate for macOS

How CleanMate decides what is safe to remove →