How to Delete Obsolete OneDrive Folders and Fix Error 0x8007016A
Question details
The user needs to remove an obsolete, duplicate OneDrive folder that triggers error 0x8007016A upon deletion, without modifying the active OneDrive directory or changing the USERPROFILE environment variable.

- Product
- OneDrive
- Device & OS
- Windows
- Scenario
- Attempting to clean up an old, obsolete OneDrive folder that remains on the original drive after reinstalling OneDrive or moving user folders to a different drive.
- Observed behavior
- Two OneDrive entries appear in File Explorer. The old folder lacks a Location tab, and attempting to delete it results in error 0x8007016A ('the cloud provider is not running').
Before proceeding, verify which OneDrive folder is actively syncing by checking for the standard green checkmark or blue cloud sync icons in File Explorer to ensure you do not accidentally delete your current files.
Delete the Obsolete OneDrive Folder via Windows Safe Mode
Using Windows Safe Mode prevents OneDrive and other cloud providers from running in the background, allowing you to bypass error 0x8007016A and delete the locked folder.
When a OneDrive folder is no longer active but still registered by Windows, background sync processes can lock the files and directories. Booting into Safe Mode ensures these cloud services are completely stopped so you can regain control.
Press the Windows key + R on your keyboard to open the Run dialog box. Type 'msconfig' into the text field and press Enter.
In the System Configuration window, navigate to the 'Boot' tab. Under 'Boot options', check the box next to 'Safe boot' and ensure 'Minimal' is selected. Click 'Apply', then 'OK'.
A prompt will appear asking you to restart your computer. Click 'Restart' to boot your PC into Windows Safe Mode.
Once in Safe Mode, open File Explorer and navigate to the location of the obsolete OneDrive folder. Select the folder, right-click, and choose 'Delete' to permanently remove its contents and subfolders.
Open the Run dialog (Windows key + R) again, type 'msconfig', and go back to the 'Boot' tab. Uncheck 'Safe boot', click 'OK', and restart your computer to return to normal Windows operation.

Unlink the PC and Clean Up the Directory
If Safe Mode is not an option, you can try temporarily unlinking your OneDrive account to sever the connection to all local sync folders before deleting the obsolete one.
Experience Seamless File Management with WPS Office
While troubleshooting Microsoft OneDrive and Windows folder sync issues, consider a more streamlined document management experience. WPS Office is a highly compatible, lightweight, and free alternative to Microsoft Office that offers its own reliable built-in cloud storage without complex folder location errors.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
- 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your PC.
- 3. Sign In for Cloud Features: Launch WPS Office and sign in to activate your free WPS Cloud storage, keeping your documents secure and synced automatically.

Frequently Asked Questions
What does OneDrive error 0x8007016A mean?
Error 0x8007016A indicates that the cloud file provider is not running. This typically happens when you try to modify or delete a folder that Windows believes is still managed by OneDrive, but the sync engine is disabled, uninstalled, or pointing to a different drive location.
Why is the Location tab missing in my OneDrive folder properties?
The Location tab disappears when a folder is no longer recognized as an active user profile library by Windows. This often occurs if you manually move user folders, reinstall Windows, or reinstall OneDrive without properly unlinking the previous directory first.
Can I just change the USERPROFILE variable to fix duplicate folders?
It is highly recommended not to change the USERPROFILE environment variable. Doing so alters the default path for all application data and other user-specific content, which can break functionality in apps like Dropbox or cause unexpected system instability.
How do I remove the duplicate OneDrive icon from the File Explorer sidebar?
If deleting the folder doesn't remove the icon from the sidebar, you may need to remove its registry key. Open the Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace, locate the folder key that matches your old OneDrive instance, and delete it. Proceed with caution when editing the registry.




