Where apps hide your files
Flutter lives wherever you unzipped or cloned it, so the quickest way to find it is which flutter. This post covers that, the other places it hides, and the separate pub cache for packages.
Flutter has no fixed install folder on a Mac. The SDK is a folder you put somewhere yourself, and the place is wherever you unzipped or cloned it. Flutter's own install guide suggests extracting it into ~/develop, which gives ~/develop/flutter, and many people use ~/development or ~/flutter. On the Mac used for this guide it is:
~/flutter
The program you run is the flutter script inside the SDK's bin folder. To see which SDK your Terminal is using, ask the shell:
which flutter
The answer ends in /bin/flutter. Remove that tail and you have the SDK folder. If it prints nothing, Flutter is not on your PATH yet. flutter doctor -v also prints the SDK path, on the line that reads Flutter version <version> on channel <channel> at <path>, and flutter --version shows the version, channel and Dart version.
The install guide extracts a zip into a folder, but other routes put the SDK elsewhere:
git clone, as a folder named flutter. It has a .git folder inside, so git -C <path> describe --tags shows its version.flutter cask puts the SDK in share/flutter under the Homebrew prefix (/opt/homebrew/share/flutter on Apple silicon, /usr/local/share/flutter on Intel) and links flutter and dart into Homebrew's bin. Run ls -l "$(which flutter)" to follow the link.FVM_CACHE_PATH variable moves it). A project that uses FVM has a .fvm/flutter_sdk link pointing at the SDK it uses.dart.flutterSdkPath setting.An editor can also point at a different SDK from the one your Terminal uses, which explains many "works in Terminal, not in the IDE" reports. In Android Studio the path is under Settings > Languages & Frameworks > Flutter, in the Flutter SDK path field; in VS Code, the command Flutter: Change SDK shows and switches it.
| Folder or file | What it is |
|---|---|
bin/ | The flutter and dart launchers |
bin/cache/ | Downloaded engine, Dart SDK, web SDK and iOS tools, created on first run |
packages/ | The framework source, including flutter and flutter_tools |
version | A one-line file holding the version number (recent releases also write bin/cache/flutter.version.json) |
bin/internal/engine.version | The engine revision this SDK expects |
bin/cache is the heavy part. On the Mac used for this guide, the SDK folder is about 3.4 GB in total and bin/cache is about 2.6 GB of that. Flutter downloads these artifacts itself, so do not move files in and out of that folder by hand.
The SDK is separate from the packages your apps depend on. Those are downloaded into the pub cache. Dart's documentation gives the default as:
~/.pub-cache
Set the PUB_CACHE environment variable to use another folder. The cache is created when you first fetch packages, so it may not exist on a fresh machine. Tools you install globally with dart pub global activate also end up here, with their launchers in ~/.pub-cache/bin, which you add to your PATH if you use such tools.
The pub cache is the supported way to clear package downloads. Dart's documentation describes two commands: dart pub cache repair re-downloads every package in the cache (useful when something was edited or damaged), and dart pub cache clean empties it, which Dart documents as a way to reclaim space or remove problem packages. Flutter has its own flutter pub wrapper around the same tool; run flutter pub cache --help to see what your version offers. Emptying it only forces packages to be downloaded again the next time a project needs them, but check what else you keep there, such as activated global tools, before you run it.
Flutter keeps your tool settings in a small file in your config folder, and it is where flutter config writes things like the Android SDK path:
~/.config/flutter/settings
It is a plain JSON file (if an older ~/.flutter_settings file exists, Flutter uses that instead). Next to it, on the Mac used for this guide, is a tool_state file. Each project records the package versions it resolved in pubspec.lock and their locations in .dart_tool/package_config.json; the package files themselves stay in the pub cache.
Android tooling is separate too. The Android SDK comes from Android Studio, not from Flutter, and you can point Flutter at a different copy with flutter config --android-sdk <path>. Xcode is the other half for iOS and macOS builds.
flutter upgrade updates the SDK in place, and flutter channel lists and switches channels. Both rely on the SDK being a git checkout, and the zip download is one: Flutter's packaging script builds each release archive by cloning the repository and keeps its .git folder. If you installed with Homebrew, brew upgrade --cask flutter is the matching way to update, so Homebrew's record of the version stays in step with the folder.
To move the SDK, quit your editors, move the whole folder, then update the PATH line in ~/.zprofile (the file Flutter's guide tells you to edit) and the SDK path in your IDE settings. Pick a folder you own, with no spaces in its path. On a new Mac, download a fresh SDK rather than copying the old one: the release zips are built per CPU type, and bin/cache holds binaries downloaded for the old machine. Copy your projects, then run flutter doctor.
~/flutter is an ordinary visible folder, but nothing about its name says where it came from, and the pieces that matter are inside bin/cache and ~/.pub-cache. That second one is a hidden dot-folder, so Finder searches skip it entirely.
If you cannot remember where you put the SDK, type flutter_tools.snapshot into Everywhere: the file sits once in each SDK's bin/cache, so the folder column tells you where every copy on the Mac is, including old ones you forgot about. Typing .pub-cache finds the package cache, and ⌘T opens a Terminal in the folder you pick. Everywhere searches file names only, not the contents of files.
There is no fixed location. Run which flutter and remove the trailing /bin/flutter to get the SDK folder, commonly ~/develop/flutter, ~/development/flutter or ~/flutter, or /opt/homebrew/share/flutter for a Homebrew install.
At ~/.pub-cache by default, according to Dart's documentation. Set PUB_CACHE to use another folder.
Run flutter doctor -v or which flutter in Terminal, then paste the folder (without /bin/flutter) into Android Studio's Flutter SDK path field or VS Code's Flutter: Change SDK command.
Yes. Quit your editors, move the folder, then update the PATH line in your shell startup file and the SDK path in each editor.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised