Heads Up: The Disk Wipe Feature In Windows 11 And 10 Can Leave Your Data Behind

one drive for pc
Earlier today, we reported on a circumstance in which NVMe SSDs can lose your data, which is a bad situation when you need to preserve said data. However, it turns out that both Windows 11 and 10 have the opposite problem. Sometimes you do want your data to disappear, as when wiping a device clean, but it appears Windows version 21H2 has trouble letting go of some files when wiped.

Both Windows 10 and 11 support OneDrive’s Known Folder Move (KFM) feature, which redirects the Desktop, Documents, and Photos folders to OneDrive without disturbing their regular location within File Explorer. When KFM is enabled, OneDrive Files on Demand adds a green check mark icon to these folders, indicating that the files are stored on the local drive, as well as in OneDrive. This feature is handy for moving to a new device, as the Desktop, Documents, and Photos folders on the new device will sync with the folders stored in OneDrive, bringing over all the files stored in those folders on your old device.

windows disk wipe leaves behind data example news
A test demonstration showing a file left over after a full Windows drive wipe - yikes.

However, in the latest version of Windows, if you make use of OneDrive KFM to move to a new device, then wipe your old one, your files will survive the wipe. The Windows disk wipe feature has an option for retaining user data, but Windows 21H2 contains a bug that maintains old OneDrive data in the folder Windows.old, regardless of the disk wipe options you select. Rudy Ooms, a Microsoft MVP, found this alarming bug, and was able to confirm that it is specific to Windows 10 and 11 version 21H2. Windows 10 version 21H1 fully wipes the device as intended.

According to Rudy, Microsoft is aware of this bug and is working to fix it. In the mean time, Rudy has published a PowerShell Script that forces a full wipe to remove these lingering files, fixing the issue. You can find the fix, as well as Rudy’s detailed explanation, in his blog post.
NW

Nathan Wasson

Nathan grew up with computer hardware news and reviews in the family business and eventually joined the business himself in 2014. He initially joined to make video reviews and help with the podcast, but was soon asked if he would write, and he's been writing about computers ever since. More recently, Nathan has developed a passion for internet privacy, security, and decentralization and likes writing about those topics the most. He spends much of his free time tinkering with Linux distributions, custom Android ROMs, privacy and security tools, and self-hosting solutions. He also started gaming on a PC at a young age and still can't give up Unreal Tournament 2004 and Supreme Commander 2. Beyond computers, Nathan is a car enthusiast and philosophy nerd.

You can follow Nathan on Mastodon and Twitter.

Opinions and content posted by HotHardware contributors are their own.