Unable to remove onedrive folder


  1. mck
    Posts : 142
    Windows 10 Home
       #1

    Unable to remove onedrive folder


    Running Windows 10 Home.

    I uninstalled MS Onedrive successfully per the instructions in the tutorial on tenforums.
    Now I want to remove the onedrive folder in "C:\users\myusername\AppData\Local\Microsoft\OneDrive.

    To see if removing the OneDrive folder will cause any problems, I first tried to rename it as "~OneDrive". But I get an error message that says:

    "The action can't be completed because the folder or a file in it is open in another program."

    How can I rename the OneDrive folder? And then remove it later if no problems?
      My Computer


  2. Posts : 4,801
    Windows 11 Pro 64 Bit 22H2
       #2

    If you disabled OneDrive then the OneDrive folder will be empty. so it's not going to save any space.
    But if it bothers you that much, you can remove it from the Registry or Group Policy Editor How to Disable OneDrive and Remove It From File Explorer on Windows 10
      My Computer


  3. Posts : 68,988
    64-bit Windows 11 Pro for Workstations
       #3

    Hello mck,

    In addition, you might see if you may be able to delete the folder after disabling OneDrive integration using an option in the tutorial below.

    Enable or Disable OneDrive Integration
      My Computers


  4. mck
    Posts : 142
    Windows 10 Home
    Thread Starter
       #4

    spunk said:
    If you disabled OneDrive then the OneDrive folder will be empty. so it's not going to save any space.
    But if it bothers you that much, you can remove it from the Registry or Group Policy Editor How to Disable OneDrive and Remove It From File Explorer on Windows 10
    After uninstalling OneDrive using the tutorial on tenforums and then doing a restart, my OneDrive folder still contains 85GB of data. I will try removing the folder via registry mod after I do a backup of my C drive.
    Thanks,
    mck

    - - - Updated - - -

    Brink said:
    Hello mck,
    In addition, you might see if you may be able to delete the folder after disabling OneDrive integration using an option in the tutorial below.
    Enable or Disable OneDrive Integration
    Thanks for your suggestion Brink. Unfortunately, after downloading and running "Disable_OneDrive_Integration.reg" and doing a restart, I still get the same error msg when I try to rename the OneDrive folder. I do not have OneDrive shown in Win10's File Explorer left pane.
    Thanks,
    mck
      My Computer


  5. Posts : 4,801
    Windows 11 Pro 64 Bit 22H2
       #5
      My Computer


  6. mck
    Posts : 142
    Windows 10 Home
    Thread Starter
       #6

    spunk said:
    Did that but still getting the error msg "The action can't be completed because the folder or a file in it is open in another program." when trying to rename the OneDrive folder. Thanks.

    - - - Updated - - -

    mck said:
    Running Windows 10 Home.

    I uninstalled MS Onedrive successfully per the instructions in the tutorial on tenforums.
    Now I want to remove the onedrive folder in "C:\users\myusername\AppData\Local\Microsoft\OneDrive.

    To see if removing the OneDrive folder will cause any problems, I first tried to rename it as "~OneDrive". But I get an error message that says:

    "The action can't be completed because the folder or a file in it is open in another program."

    How can I rename the OneDrive folder? And then remove it later if no problems?
    Was finally able to delete the OneDrive folder.

    After doing all of the previous suggestions, I was never able to rename the OneDrive folder and kept getting the error message: "The action can't be completed because the folder or a file in it is open in another program."

    I decided to just go ahead and try to delete the OneDrive folder without the safety precaution of renaming it first. Here's what happened:

    1. I did a shift+delete to delete the OneDrive folder without putting it into Win10's recycle bin.
    2. Surprisingly the contents of the OneDrive folder started to be deleted. It took a long time and displayed a progress bar because it was 85GB in size.
    3. Toward the end of the deletion process, it said it could not delete a file because it was open in Macrium Reflect. I did not use Macrium during this boot up so Macrium was running in the background due to some auto start on boot. It gave the choice to skip the file so I clicked that and the deletion procedure completed.
    4. But the OneDrive folder was still present.
    5. I tried to delete it again and got the same message about Macrium.
    6. However, when I checked the size of the OneDrive folder, the 85GB was gone and it was only some kilo bytes in size.
    7. I went into Task Manager and did an End Task for the 3 Macrium processes that were running.
    8. Now I was able to delete the OneDrive folder.

    So it appears that "maybe" the reason I could not rename the OneDrive folder "because a file was open in another program" was because of the auto start Macrium Reflect processes. Too bad that Microsoft programmers could not see fit to say which program it was during the rename process, but luckily did say which program it was in the delete process.

    EDIT: I just rechecked and the OneDrive folder is still present. Either it appeared to have been deleted or I missed seeing it after step-8 above. But I'll just leave it since it only contains 1.46 MB of data. Though I'll need to check it later to see if it increases in size.

    Thanks to the folks who helped and hope this info helps others,
    mck
      My Computer


  7. Posts : 4,801
    Windows 11 Pro 64 Bit 22H2
       #7

    Glad to see you got it sorted. If you ever get the message a folder can't be deleted because a program in it is still running; then drill down into the folder till you see the various files and it should list a program, then Task Manager and End the Task. If you still have problems, boot into Safe Mode to Delete the File. Or use a program like Unlocker It will tell you what process is locking the file, and offer to close it.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:50.
Find Us




Windows 10 Forums