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. "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 is a tech journalist at Windows Central, specializing in Windows, Microsoft software, AI, and PCs. He's covered major launches, from Windows 10 and 11 to the rise of AI tools like ChatGPT. Sean's journey began with the Lumia 740, leading to strong ties with app developers. Outside writing, he coaches American football, utilizing Microsoft services to manage his team. He studied broadcast journalism at Nottingham Trent University and is active on X @SeanEndicott_ and Threads @sean_endicott_.