Skip to content

flutter clean cant delete .dart_tool #9532

@asafgo

Description

@asafgo

Since the following version on windows 11

Flutter 3.38.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b45fa18946 (8 days ago) • 2025-11-12 22:09:06 -0600
Engine • hash 78c3c9557e50ee7c676fa37562558c59efd8406a (revision b5990e5ccc) (13 days ago) • 2025-11-12 21:08:24.000Z
Tools • Dart 3.10.0 • DevTools 2.51.1

When running command flutter clean I get an error:
Failed to remove C:\aaa\bbb.dart_tool. A program may still be using a file in the directory or the directory itself. To find and stop such a
program, see: https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used

checking with File Locksmith I see a lot of dart.exe processes locking the folder .dart_tool

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions