Microsoft confirms Windows 11 isn't deleting files when it should

Surface Laptop Studio Hero
Surface Laptop Studio Hero (Image credit: Windows Central)

What you need to know

  • Microsoft has confirmed an issue with Windows 11 and Windows 10 that prevents files from being completely deleted after a reset.
  • The bug affects PCs that have synced files through OneDrive or OneDrive for Business.
  • Microsoft is working on a resolution for the issue and has shared a workaround that should help until a permanent fix is available.

Resetting a PC running Windows 11 or Windows 10 is supposed to let you completely wipe your files from a device. A recently discovered bug prevents the erasure of certain files. The issue was first spotted in late February and has since been confirmed by Microsoft.

Affected PCs may not delete files synced through OneDrive or OneDrive for Business following a reset. The bug affects Windows 11 version 21H2, Windows 10 version 21H2, Windows 10 version 21H1, and Windows 10 version 20H2.

"When attempting to reset a Windows device with apps which have folders with reparse data, such as OneDrive or OneDrive for Business, files which have been downloaded or synced locally from OneDrive might not be deleted when selecting the "Remove everything" option," explains Microsoft (opens in new tab). "This issue might be encountered when attempting a manual reset initiated within Windows or a remote reset."

Microsoft is working on a permanent fix for the issue. Until that is available, the company suggests the following workaround:

  • This issue can be prevented by signing out or unlinking OneDrive before resetting your Windows device. For instructions, see the "Unlink OneDrive" section in, Turn off, disable, or uninstall OneDrive.
  • This issue can be mitigated on devices that have already been reset by following the steps in KB5012334—Delete the Windows.old folder using Storage sense in the Settings app.

The Windows.old folder mentioned by Microsoft is where files that have not been successfully deleted appear.

Sean Endicott
News Writer and apps editor

Sean Endicott brings nearly a decade of experience covering Microsoft and Windows news to Windows Central. He joined our team in 2017 as an app reviewer and now heads up our day-to-day news coverage. If you have a news tip or an app to review, hit him up at (opens in new tab).

  • As someone that reset and returned a Surface Laptop Studio recently this is very distressing. When I first got the SLS I also used the "Remove Everything" option on my old PC and gave it to a family member only to find my entire profile, including my files and login credentials, had redownloaded itself a week later.
  • Off topic, how are you liking the SLS? Is it all you'd hoped from the reviews? How do you find the screen resolution (because it's lower than the Surface Pro)?
  • I actually returned it and got a Surface Pro 8 with LTE instead. It was absolutely phenomenal but the lack of LTE was a deal breaker. I actually liked the screen better than the Surface Pro 8 because it's still such a high resolution on such a small display that you don't really lose any benefit in picture quality, but you definitely get better performance and battery life out of it. I had the i5 model and averaged about 10-12 hours of usage per charge, but I know people that have the i7 version only get 3-4 hours because there's some power draw issues with the RTX 3050 even when it's not in use. I also can't overstate how heavy the SLS is. Even though it's only 4 lbs, it feels like it should be much lighter given it's size.
  • NEVER trust built-in "Remove Everything" utilities on ANY OS. If you do, ALWAYS delete any left-over folders and run the Disk Cleanup/Cleanup System Files afterwards. Even then, you should perform a low-level wipe of all data on the drive. Delete all partitions, and then low-level format it. THEN run a DiskWipe on it to write and re-write new data to ALL sectors on the drive. Resinstall the OS afterwards if you are giving it to a family member. A Clean system is a good system. As the "Aliens" quote says: "I say we take off and nuke it from orbit. It's the only way to be sure." If you are a company getting rid of old systems, contract with someone who will PROVE they either destroyed the drives or at least DiskWipe'd them (but you should do it yourself before you turn over the hardware to them, especially with Server hardware.)
  • Never trust one-drive is a better message here.
  • That is not the proper message. OneDrive is a good system. If you follow normal guidelines for preparing a computer for sale, like Khaaannn wrote above, then you won't have any problems. This is wise because even deleted files are recoverable otherwise with readily available tools, regardless of the use of OneDrive. To be fair, a lot of us probably wouldn't bother to fully wipe the drive (including me in many case), but if there are files you don't want others to have, that's always been the only safe solution.
  • Most users are not aware that when you delete a file, all the system does is remove the directory listing for it.
    The DATA is still there (especially with Journaling file systems like NTFS) until it's sectors are overwritten by some other file, but with today's massive multi-Terrabyte HDs, that is unlikely to occur in normal use. The analogy I use is: Getting rid of your house by taking the number off the front and then expecting that no one can see it anymore or enter it. One more thing to remember is, with NVME SSDs, to perform a TRIM function regularly (Windows 10 and above will automatically do this BTW) because it contains a cache of the entire directory system and you can recover data from an SSD long after it is removed from a system. Don't even get me started on USB sticks..............
  • Do laptops and PC's not have a factory restore option any more? I realize this doesn't apply to custom built PC's, but for everything else there has always been an option to revert a system to it's factory state. This shouldn't be affected at all by OneDrive or anything else because all of that will be gone from the machine.