Flutter disk cleanup
Flutter junk lives in three places: per-project
build/ and .dart_tool/ (1-5 GB per app once
you build for iOS and Android), the global pub cache, and the
Flutter SDK's own artifact cache.
Per project
flutter clean # removes build/ and .dart_tool/ for this project
Everything regenerates on the next flutter run. For repos
you're not touching anymore, deleting the folders directly is the same
thing:
find ~ -name .dart_tool -type d -prune -exec du -sh {} + 2>/dev/null | sort -rh | head
The global pub cache
du -sh ~/.pub-cache
dart pub cache clean # wipes it; packages re-download on next pub get
The SDK's artifact cache
flutter/bin/cache # engine binaries per platform you built for
Managed by the SDK – flutter precache --force re-fetches
what's needed. Old SDK checkouts (if you keep several versions) are the
bigger win: each is 2-4 GB.
Don't forget the platform sides
A Flutter app is also an iOS and an Android project:
DerivedData, CocoaPods'
Pods/ and Gradle
caches all apply on top.
CacheCleaner finds Flutter build/ and
.dart_tool/ folders across your disk together with the
pub cache, Pods, and the Xcode/Gradle layers underneath – one scan for
the whole cross-platform stack.