0

Everytime I run flutter clean I get this error :

C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter>flutter clean
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\.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
Deleting .dart_tool...                                              14ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\ios\Flutter\ephemeral. 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
Deleting ephemeral...                                                5ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\linux\flutter\ephemeral. 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
Deleting ephemeral...                                                7ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\macos\Flutter\ephemeral. 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
Deleting ephemeral...                                                4ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\windows\flutter\ephemeral. 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
Deleting ephemeral...                                                6ms

I tried ProcessExplorer, File LockSmith and ResourceMonitor to find out which process might be using those directories. There is no process that is locking that folder. Restarted the laptop. Most post suggested either dashes or spaces in the folder name might be the problem but as you can see there is none. The only thing that works is going and deleting each one of those folders manually. The only thing that I can think about is that OneDrive might be interfering but not sure. Please help.

1
  • 1
    OneDrive is likely the issue here - I remember running into these sorts of issues with a video editing program as well. A good directory to use for repositories is C:\Users\salil\source - this is the path that Visual Studio uses by default. Commented Nov 18 at 15:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.