Here's how to permanently wipe OneDrive folders from your PC if they keep recreating themselves

OneDrive crossed out
(Image credit: Microsoft)

There aren't many things in life I regret more than letting Windows install OneDrive. Honestly, I don't remember if it even gave me an option, but I assume that at some point when updating Windows 10 Microsoft snuck it in and I didn't find the buried checkbox I needed to nip it right in the bud. So I let OneDrive in, it took over my Documents and Photos folders, promptly filled up its cloud storage, and started hounding me to buy more storage space. "Immediately making your product hateable" doesn't strike me as the best strategy, but maybe my lack of vision in this area is why I don't run a trillion-dollar company. Anyway: I got fed up, uninstalled OneDrive, and assumed that would be the end of it.

It was not the end of it.

Steve Ballmer's ghost has been haunting me through an undead OneDrive folder ever since. Even though I told OneDrive to stop syncing all my folders and then uninstalled it, somewhere in the bowels of Windows a remnant remained. When I installed new programs, they'd often default to storing their config files in C:\Users\[myname]\OneDrive\Documents. Even though I had deleted that folder. They just kept recreating it! 

I can't say I keep my PC perfectly organized—my Downloads folder is a mess of years worth of animated gifs and installers—but I at least like to know that when I open up my Documents folder, it's all of my documents, not Most Of My Documents Except The Ones Created By Programs Installed In The Last Month. The general advice here is to set your Documents folder location in File Explorer, but I'd done that, and it didn't stop the OneDrive folder from being resurrected with every new install.

I scoured the internet looking for a solution for this problem, and most Microsoft help pages and forum discussions I ended up on were dead ends. Finally I found it: the registry entry I needed to modify to banish OneDrive from my PC once and for all. Hopefully this offers someone else out there the same relief it offered me.

How to stop Windows programs from defaulting to a nonexistent OneDrive folder

We're going to do some very light registry editing to fix this annoying problem. Don't worry, it isn't scary: these are clearly marked, easily understandable registry entries we're changing, not arcane blobs of numbers.

1. Press the Windows key and type "Regedit" to search for the Registry Editor. Click it to open it up.

2. Copy/paste this string into the address bar at the top and hit enter: 

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Once there, you should see a fairly short list of default folder locations. If your system is like mine, most of these entries are in plain English, e.g. "My Music" and "Programs," while a few are longer bits of gibberish in {}. What you want to look at is the Data column, which indicates where Windows is by default directing new programs that want to set up shop in your Documents/Photos/etc. folders. Here I found my culprits. 

OneDrive registry edits

(Image credit: Future)

3. The fix is simple. Right-click on each entry in the Name column and hit Modify. Delete "OneDrive\" from the address string and hit OK. Do this for any and all entries where OneDrive shows up. 

OneDrive registry edits

(Image credit: Future)

And that's it: you're freed from the OneDrive curse. Breathe deep of that fresh, clean air and enjoy knowing that new programs will put their files just where you want them. 

Wes Fenlon
Senior Editor

Wes has been covering games and hardware for more than 10 years, first at tech sites like The Wirecutter and Tested before joining the PC Gamer team in 2014. Wes plays a little bit of everything, but he'll always jump at the chance to cover emulation and Japanese games.

When he's not obsessively optimizing and re-optimizing a tangle of conveyor belts in Satisfactory (it's really becoming a problem), he's probably playing a 20-year-old Final Fantasy or some opaque ASCII roguelike. With a focus on writing and editing features, he seeks out personal stories and in-depth histories from the corners of PC gaming and its niche communities. 50% pizza by volume (deep dish, to be specific).

Read more
A promotional image for Microsoft OneDrive, showing a stylized collage of a tablet, phone, and application icons together
About darn time: Microsoft says it has fixed the annoying lag in Windows Explorer when working with cloud-based files
woman using pc
9 Windows 11 settings we recommend changing
Microsoft Copilot
A rather pleasing Windows 11 update bug automatically uninstalls Copilot and unpins it from the taskbar, which is jolly nice of it
Retro 1990s style beige desktop PC computer and monitor screen and keyboard. 3D illustration.
Microsoft nixes details of its Windows 11 TPM 2.0 security bypass though there are still other ways of getting the latest OS on 'unsupported' hardware
Microsoft Windows 11
If you installed Windows 11 with certain security updates and a USB stick, you may not get any more security updates warns Microsoft
Microsoft wants to 'recruit your squad' in the latest unbidden Game Pass ad on your Windows Settings homepage. Also, it might crash
Latest in Windows
Microsoft Copilot
A rather pleasing Windows 11 update bug automatically uninstalls Copilot and unpins it from the taskbar, which is jolly nice of it
Microsoft's Task Manager in Windows 11
After years of complaints about Windows Task Manager displaying CPU utilization incorrectly, a fix is finally on its way
Microsoft Windows 11
The latest Windows 11 dev build gives you the ability to snap together commonly paired apps for access in a single click, and I'm already sold
Windows 11's new emoji button in the taskbar.
You might mock Microsoft's new emoji button in Windows 11 but as someone that's explained how to quickly access emojis and special characters too many times, I get it
Windows 10 operating system logo is displayed on a laptop screen for illustration photo. Gliwice, Poland on January 23, 2022.
Valve's monthly survey reveals that almost 45% of Steam users on PC are still using Windows 10 even with the sword of Damocles hanging over them
Microsoft Windows 11
If you installed Windows 11 with certain security updates and a USB stick, you may not get any more security updates warns Microsoft
Latest in Features
midnight murder club
Five new Steam games you probably missed (March 17, 2025)
Geralt, two swords on his back, in the wilderness
2011 was an amazing comeback year for PC gaming
Alligator skull with glowing eyes on human body and cords coming out sitting at piano with "The Norwood Etudes" ready to play
My new most anticipated RPG let me be a kleptomaniac gourmand set loose in a noir city on a quest to make 'the perfect sandwich'
Monster Hunter Wilds' stockpile master studying a manifest
Monster Hunter Wilds' new gyro controls are a fantastic option for disabled and able-bodied players alike
Manhunt 2
I played the notoriously ratings-board-ravaged Manhunt 2 and was quite glad for the censorship actually
Wyrdsong concept art
Wyrdsong, the RPG from ex-Bethesda talent, isn't dead—but it's no longer an open world: 'We're down to a skeleton crew'