The short answer
Yes. Rebuilt or re-downloaded automatically when needed.
What is it?
Dart and Flutter create a .dart_tool folder next to pubspec.yaml with package configuration, build caches and generated files. Only folders in projects untouched for 30 days are considered. Typically tens of MB to a few hundred MB.
What happens if you delete it?
It is recreated by flutter pub get or dart pub get, which flutter run and flutter build run automatically. Code generated by build_runner is regenerated on its next run.
How to remove it properly
Run flutter clean in the project, which deletes .dart_tool and build permanently, or move .dart_tool to the Trash in Finder.
Quit the app that uses it, then move it to the Trash. Empty the Trash when you’re sure.
- MoreRoom only suggests items unused for 30 days or more.
How MoreRoom helps
MoreRoom recognises this item, shows its real size and when it was last used, and labels it “Safe to remove”. In the free version you can move it to the Trash in one click, with Undo; Pro collects every safe item at once.
Frequently asked questions
Is it safe to delete the .dart_tool folder in Flutter?
Yes. Rebuilt or re-downloaded automatically when needed. It is recreated by flutter pub get or dart pub get, which flutter run and flutter build run automatically. Code generated by build_runner is regenerated on its next run.
Will Flutter project caches (.dart_tool) come back after I delete it?
Yes. It is recreated by flutter pub get or dart pub get, which flutter run and flutter build run automatically. Code generated by build_runner is regenerated on its next run.
How do I remove Flutter project caches (.dart_tool) properly?
Run flutter clean in the project, which deletes .dart_tool and build permanently, or move .dart_tool to the Trash in Finder.