How to Clear OneDrive Cache: Step-by-Step Guide
In this article
To clear the OneDrive cache, you need to reset the app's local database. On Windows, the quickest method is to sign out and back in, which forces OneDrive to rebuild its cache. For a deeper clean, you can delete the hidden cache folders manually. On Mac, you can use the Reset option in OneDrive preferences. This guide walks you through each method safely, explains what gets removed, and helps you avoid common pitfalls. Clearing the cache can fix sync errors, free up disk space, and resolve issues where files show as pending or stuck. No special tools are required, but you should have your Microsoft account credentials handy and be prepared to re-sync your files.
What You'll Need
- A computer running Windows 10/11 or macOS with OneDrive installed and signed in.
- Your Microsoft account email and password (to sign back in).
- Administrator rights on the PC (for some manual deletion steps).
- Enough free disk space to allow OneDrive to re-download file metadata (usually a few hundred MB).
Step-by-Step
Menu labels and paths can differ slightly depending on your OneDrive version, Windows/macOS version, and region. The steps below are for the current official OneDrive app on Windows and Mac. If you are on a work or school account, some options may be managed by your organization.
Method 1: Sign out and sign in (Windows and Mac)
- Click the OneDrive cloud icon in the notification area (Windows) or menu bar (Mac).
- Click the gear icon (Settings) and select Settings (or Preferences on Mac).
- Go to the Account tab.
- Click Unlink this PC (Windows) or Unlink this Mac (Mac). Confirm if prompted.
- Sign in again with your Microsoft account. OneDrive will rebuild its cache from scratch.
This is the safest method and often resolves sync issues without deleting any local files. Your files remain on your PC and in the cloud; only the sync database is reset.
Method 2: Manually delete cache folders (Windows)
Warning: Deleting cache folders removes temporary data and forces OneDrive to re-sync. It does not delete your actual files, but you may see files re-download or re-upload. Close OneDrive before proceeding.
- Right-click the OneDrive cloud icon and select Quit OneDrive (or Close).
- Open File Explorer and navigate to
%localappdata%\Microsoft\OneDrive\. You can paste this path into the address bar. - Locate the folders named
cache,logs, andsetup. You can delete their contents, but keep the folders themselves. - Also check
%localappdata%\Microsoft\OneDrive\settingsfor a file namedglobal.ini; do not delete it unless instructed. - Restart OneDrive from the Start menu. It will recreate the cache files.
If you cannot find the folders, enable Hidden items in File Explorer's View tab.
Method 3: Reset OneDrive (Windows)
- Press Windows key + R to open the Run dialog.
- Type
%localappdata%\Microsoft\OneDrive\OneDrive.exe /resetand press Enter. (If you have the Store version, use%localappdata%\Microsoft\OneDrive\OneDrive.exe /resetmay not work; instead, use Settings > Apps > OneDrive > Advanced options > Reset.) - OneDrive will restart and re-sync. This resets the cache without unlinking your account.
Method 4: Clear cache on Mac
- Click the OneDrive icon in the menu bar and select Preferences.
- Go to the Account tab and click Unlink this Mac. Sign in again.
- For a deeper clean, quit OneDrive, then open Finder and go to
~/Library/Application Support/OneDrive(hold Option and click Go > Library). Delete thecacheandlogsfolders inside. - Restart OneDrive.
Common Mistakes
- Deleting the entire OneDrive folder: This removes your local files and can cause data loss if they are not backed up. Only delete cache subfolders.
- Not quitting OneDrive first: Deleting files while OneDrive is running can cause corruption or the files to be recreated immediately.
- Confusing cache with cloud storage: Clearing cache does not free up space in your Microsoft account; it only affects local temporary files.
- Using third-party cleaner tools: These may delete important configuration files. Stick to manual methods or built-in reset options.
- Ignoring work/school policies: On managed devices, unlinking may be blocked. Contact your IT admin.
Tips
- Before clearing cache, ensure all files are fully synced (no pending changes) to avoid conflicts.
- Use the Reset command as a middle ground between signing out and manual deletion.
- Regularly clear cache if you notice slow sync or high disk usage; it can improve performance.
- Keep OneDrive updated via the Microsoft Store or official website to avoid bugs.
- If you have a large number of files, re-syncing after cache clear may take time; do it when you don't need immediate access.
Troubleshooting
If OneDrive does not start after clearing cache, restart your computer. If sync still fails, check your internet connection and ensure the OneDrive service is not down (visit the Microsoft 365 status page). If you see errors about missing files, do not panic—OneDrive will re-download them from the cloud. For persistent issues, uninstall and reinstall OneDrive from the official Microsoft website. On Windows, you can also run the OneDrive troubleshooter from Settings > Update & Security > Troubleshoot. If you are on a work account, your organization may restrict cache clearing; contact your admin.
Frequently Asked Questions
Does clearing OneDrive cache delete my files?
No. Clearing cache only removes temporary data and sync logs. Your files remain in the cloud and on your device (unless you manually delete them).
Will I need to re-download all my files after clearing cache?
Not all files, but OneDrive will re-sync metadata and may re-download files that were not set to "Always keep on this device." Files set to "Free up space" will remain online-only.
How often should I clear the OneDrive cache?
Only when you experience sync problems or high disk usage. There is no need for routine clearing.
Can I clear OneDrive cache on a phone or tablet?
The mobile OneDrive app does not have a cache clearing option. You can sign out and back in, or clear app data via your device settings (this removes your sign-in and local cache).
What is the difference between resetting and unlinking OneDrive?
Resetting reinitializes the sync engine without removing your account. Unlinking disconnects your account entirely; you must sign in again.
Is it safe to delete the OneDrive folder in AppData?
Only delete the cache and logs subfolders. Deleting the entire OneDrive folder in AppData can remove settings and cause OneDrive to malfunction.