Skip to content

Flutter: Cleaning Xcode workspace takes 2-3 minutes #173940

Description

@EmreDET

Hey Flutter Community, I've looked at similar issues but non resemble the issue we have.

While running the usual command flutter clean we've noticed several months ago that it takes too long, nearly up to 3 minutes, which definitely is not the case for new projects. Maybe it has to do with the fact that we use too many dependencies? We're using SPM and the latest Flutter Version 3.35.1. If needed I can supply the packages we have in our pubspec.yaml.

flutter clean -v (provided as a file because it's very big with >500.000 chars): clean.txt

flutter doctor -v
[✓] Flutter (Channel stable, 3.35.1, on macOS 15.6 24G84 darwin-arm64, locale de-DE) [499ms]
    • Flutter version 3.35.1 on channel stable at /Users/emre.yurtseven/Dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 20f8274939 (4 days ago), 2025-08-14 10:53:09 -0700
    • Engine revision 1e9a811bf8
    • Dart version 3.9.0
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-swift-package-manager, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3,7s]
    • Android SDK at /Users/emre.yurtseven/Library/Android/sdk
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Corretto-17.0.13.11.1 (build 17.0.13+11-LTS)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [1.194ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [6ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [6ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[✓] VS Code (version 1.103.1) [4ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Connected device (3 available) [6,4s]
    • iPhone 16 (mobile) • 620FF751-F320-4085-915B-D8DA36474288 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-5 (simulator)
    • macOS (desktop)    • macos                                • darwin-arm64   • macOS 15.6 24G84 darwin-arm64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 139.0.7258.128

[✓] Network resources [1.232ms]
    • All expected network resources are available.

• No issues found!

This is already impacting us on our daily workflows, CI/CD and fixing bugs.

Best regards
Emre Yurtseven

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions