~/.dartServer: the Dart and Flutter analysis cache that editors fill and nothing empties
Every Dart and Flutter project you open in an editor adds analysis results to a hidden cache. How to measure it, and why it is safe to clear.
The Dart analysis server is what gives your editor errors, completion and navigation in Dart and Flutter code. To start quickly, it stores analysis results in ~/.dartServer. Every project, every package version and every SDK version it has analysed adds to it, and nothing removes old entries.
Measure it
du -sh ~/.dartServer
du -sh ~/.dartServer/* 2>/dev/null | sort -hMost of it is usually in a folder named .analysis-driver, which holds the cached analysis itself.
Is it safe to clear?
Yes. It is a cache. Quit your editor first (VS Code, Android Studio, IntelliJ or any other with the Dart plugin), then move the folder to the Trash. The next time you open a project, analysis takes longer while the cache rebuilds, and then it is back to normal.
rm -rf ~/.dartServer/.analysis-driver # with editors closedThe other Flutter folders
| Folder | What it is | Covered in |
|---|---|---|
~/.pub-cache | Downloaded packages | Flutter taking up space |
| The Flutter SDK | Including cached engine artifacts | Flutter taking up space |
build in each project | Build output | Frontend build caches |
| iOS and Android builds | Xcode and Gradle output | mobile developers' guide |
Common questions
What is the .dartServer folder on a Mac?
It is the Dart analysis server's cache, used by editors for Dart and Flutter projects. It stores analysis results so projects open quickly.
Is it safe to delete .dartServer?
Yes, with your editors closed. It is a cache and is rebuilt the next time you open a project, which is slower once.
Why is .dartServer so large?
It keeps analysis results for every project, package version and SDK version it has seen, and does not remove old entries.