Guides

How to free Flutter build cache on your Mac

Which Flutter build folders and caches you can remove, how flutter clean differs from the pub cache, what to leave alone, and how Cachelift finds them all.

Last updated 25 October 2026. Cachelift is published by Brixfly.

Flutter projects leave a lot behind on disk: a build folder in every project, Dart package metadata, and a shared package cache. All of it can be recreated, but a few things nearby cannot, so it helps to know which is which.

Per project: build and .dart_tool

Each Flutter project has a build folder with compiled output and a .dart_tool folder with package metadata. To remove both for one project:

cd path/to/your_project
flutter clean

Afterwards, flutter pub get restores the package metadata and your next flutter run or flutter build recreates the build output. Both need the Flutter SDK, and pub get needs internet.

To see how big they are first:

du -sh build .dart_tool

Shared: the pub cache

Dart downloads every package you use into one shared cache:

~/.pub-cache

The downloaded packages in it can be fetched again by flutter pub get. But the same folder also holds tools you installed with dart pub global activate, such as fvm and melos. Those do not come back by themselves.

  • iOS builds also fill Xcode DerivedData. See how to clear it safely.
  • Android builds fill the Gradle cache in ~/.gradle. It downloads again on the next build.

Do it across every project with Cachelift

flutter clean works one project at a time. Cachelift finds the build and .dart_tool folders for all your Flutter projects, plus the pub cache packages, shows each size, and marks them low risk. It leaves your Flutter SDK and global Dart tools alone. You review the list, then it moves your selection to the Trash.