Reinstalling OneDrive is sometimes necessary when the sync client becomes corrupted, stops responding, or fails to start. A typical uninstall removes the application but can also delete local copies of files marked as Files On-Demand placeholders if you are not careful. This article explains how to uninstall and reinstall OneDrive while keeping all your synced files intact on your local drive. You will learn the correct order of steps, which settings to check before uninstalling, and how to restore sync after the fresh installation.
Key Takeaways: Reinstall OneDrive Without Losing Files
- OneDrive settings > Sync and backup > Advanced settings > Files On-Demand: Enable this setting so files remain as online-only placeholders instead of being downloaded and potentially deleted during uninstall.
- OneDrive > Settings > Account > Unlink this PC: Disconnecting your account before uninstalling prevents the client from attempting to sync during removal and reduces the risk of file deletion.
- Windows Settings > Apps > Installed apps > Microsoft OneDrive > Uninstall: Use this official path to remove the client cleanly without affecting files in your OneDrive folder or the cloud.
Why Reinstalling OneDrive Can Remove Local Files
OneDrive uses a feature called Files On-Demand. When enabled, files appear in File Explorer as online-only placeholders. They do not occupy disk space until you open them. During a standard uninstall, Windows may delete these placeholder files because they are considered temporary or orphaned by the sync engine. If you have set files to Always keep on this device, those files are fully downloaded and are not deleted during uninstall. However, the folder structure and any files you have not explicitly marked as always available may be removed.
The uninstall process itself does not touch files stored in the cloud. Every file you have synced to OneDrive remains in your cloud storage. The risk is only to local copies that have not been fully downloaded or files you have not backed up elsewhere. By following the steps below, you ensure that all local files remain on your hard drive and that you can resume syncing after reinstalling.
Steps to Reinstall OneDrive While Keeping All Files
Follow these steps in order. Do not skip any step, especially unlinking your account and enabling Files On-Demand before uninstalling.
- Enable Files On-Demand
Open OneDrive by clicking the cloud icon in the system tray. If the icon is hidden, click the Show hidden icons arrow. Select Help & Settings > Settings. Go to the Sync and backup tab and click Advanced settings. Under Files On-Demand, select Save space and download files as you use them. Click OK. This ensures files are stored as online-only placeholders and will not be deleted during uninstall. - Unlink your PC from OneDrive
In the same OneDrive Settings window, go to the Account tab. Click Unlink this PC. When prompted, click Unlink account to confirm. This disconnects the sync relationship. The OneDrive folder and its contents remain on your local drive. Do not delete the folder. - Close OneDrive completely
Right-click the OneDrive cloud icon in the system tray and select Quit OneDrive. If you see a confirmation dialog, select Quit. This stops all sync processes before uninstallation. - Uninstall OneDrive via Windows Settings
Press the Windows key and type Installed apps. Open the Installed apps page. Scroll to Microsoft OneDrive. Click the three dots next to it and select Uninstall. Confirm the uninstall when prompted. The process removes the OneDrive application but does not delete your OneDrive folder located at C:\Users\YourUsername\OneDrive. - Restart your computer
Restart Windows to clear any remaining processes and registry entries related to the old OneDrive client. - Download and install the latest OneDrive client
Go to the official Microsoft OneDrive download page and download the OneDriveSetup.exe file for your system. Run the installer. The installation will place the new client on your system and automatically detect the existing OneDrive folder. - Sign in and configure sync
After installation, OneDrive opens automatically. Sign in with your work or school account. When prompted to choose a folder location, select the existing OneDrive folder at C:\Users\YourUsername\OneDrive. Do not create a new folder. Click Next. OneDrive will scan the folder and begin syncing. Your local files remain untouched and will sync with the cloud.
If OneDrive Does Not Detect Your Existing Folder After Reinstall
OneDrive prompts me to choose a new folder location
If the installer does not automatically detect your old OneDrive folder, you can manually point it to the correct location. During the initial setup, when you see the Your OneDrive folder screen, click the link that says Choose a different folder. Navigate to C:\Users\YourUsername\OneDrive and select that folder. OneDrive will then merge the existing files into sync.
Some files are missing from the local OneDrive folder after uninstall
If you did not enable Files On-Demand before uninstalling, some placeholder files may have been deleted. Check the OneDrive recycle bin on the web at onedrive.com. Deleted files remain there for 30 days or longer depending on your tenant policy. You can restore them from the web interface. After restoring, the files will sync back to your local folder the next time you sign in.
OneDrive shows sync errors after reinstall
Sync errors after a reinstall are usually caused by file name conflicts or corrupted cache. Open OneDrive Settings > Sync and backup > Advanced settings > Sync. Click the Clear cache button. This removes the local sync database but does not delete your files. After clearing the cache, OneDrive will rebuild the database and re-sync all files.
| Item | Uninstall Without Preparation | Uninstall With Preparation |
|---|---|---|
| Local placeholder files | May be deleted | Remain on disk |
| Files set to Always keep on this device | Remain on disk | Remain on disk |
| Cloud files | Not affected | Not affected |
| Sync relationship | Must be re-linked | Must be re-linked |
| Time to complete | 15 minutes plus re-sync | 15 minutes plus re-sync |
After reinstalling, you can re-enable any OneDrive settings you had before, such as Known Folder Move for Desktop, Documents, and Pictures. To do this, go to OneDrive Settings > Sync and backup > Manage backup and select the folders you want to protect. This will not affect your existing local files.