OneDrive Keeps a Local Copy After Free Up Space
🔍 WiseChecker

OneDrive Keeps a Local Copy After Free Up Space

You right-click a OneDrive file and select Free up space, but the file remains on your hard drive with a green check mark instead of turning into a cloud-only item. This happens because the OneDrive sync engine respects a separate setting called Always keep on this device that overrides the Free up space command. This article explains exactly why that occurs and shows you how to force a file to become online-only when Free up space does not work.

Key Takeaways: Why OneDrive Ignores Free Up Space

  • Always keep on this device folder setting: When a folder is marked Always keep, all files inside it stay downloaded regardless of Free up space commands on individual files.
  • Files On-Demand vs Always keep on this device: Free up space only works on files that are set to Locally available; it cannot override a parent folder’s Always keep setting.
  • OneDrive Settings > Sync and backup > Advanced settings > Files On-Demand: Must be enabled for Free up space to appear in the right-click menu at all.

ADVERTISEMENT

Why Free up Space Fails on Certain Files

OneDrive uses two distinct mechanisms to decide whether a file stays on your local drive: the Files On-Demand feature and the Always keep on this device setting. Files On-Demand is the underlying technology that lets files appear in File Explorer without being fully downloaded. When you right-click a file and choose Free up space, OneDrive changes that file’s state from Locally available (green check mark) to Online-only (cloud icon). This works as expected for files that are individually set to be locally available.

The problem occurs when a folder — not just the file — has been set to Always keep on this device. A folder with this setting forces all files inside it to remain downloaded even if you try to free up space on a specific file. The file will temporarily change to a cloud icon and then revert to a green check mark within seconds. OneDrive syncs the file again because the folder-level rule overrides the file-level rule.

Another less common cause is a corrupted OneDrive cache or a stale sync database. If the cache holds incorrect metadata about a file’s state, the Free up space command may appear to succeed but the file never actually gets removed from disk. A full sync reset is needed in that case.

Steps to Make a File Online-Only When Free up Space Does Not Work

  1. Check the parent folder’s Always keep status
    Open File Explorer and navigate to the folder that contains the stuck file. Right-click the folder name and select Show more options if you are on Windows 11. Look at the OneDrive menu. If Always keep on this device has a check mark next to it, click it to turn it off. This removes the folder-level download rule.
  2. Apply Free up space again on the individual file
    Right-click the file that remained local. Select Show more options if needed. Choose Free up space from the OneDrive submenu. The file icon should change to a cloud icon within a few seconds.
  3. Verify the file state in File Explorer
    Wait 10 seconds and check the status column or the overlay icon on the file. A cloud icon means the file is now online-only. If the green check mark returns, repeat step 1 and ensure no subfolder inside the parent folder also has Always keep enabled.
  4. Disable Always keep on this device for all subfolders
    Expand the parent folder and check each subfolder. Right-click each subfolder, open the OneDrive menu, and turn off Always keep on this device if it is on. Then repeat step 2 on the target file.
  5. Reset OneDrive sync as a last resort
    If the file still refuses to go online-only, the sync database may be corrupted. Press Windows Key + R, type %localappdata%\Microsoft\OneDrive\OneDrive.exe /reset, and press Enter. Wait for OneDrive to restart. After the reset, sign in again and let the sync complete. Then repeat steps 1 through 3.

ADVERTISEMENT

If OneDrive Still Keeps a Local Copy After All Fixes

OneDrive shows a green check mark but the file is still on disk

This happens when the file was recently opened by another application, such as Microsoft Word or Adobe Acrobat. The application may hold a file lock that prevents OneDrive from removing the local copy. Close all applications that might be using the file. Then right-click the file and select Free up space again. If the issue persists, restart your computer to release all file locks and repeat the steps.

Free up space option is missing from the right-click menu

The Free up space option only appears when Files On-Demand is enabled globally. Open OneDrive settings by right-clicking the OneDrive cloud icon in the notification area and selecting Settings. Go to the Sync and backup tab and click Advanced settings. Under Files On-Demand, make sure the toggle is set to On. If it is off, turn it on and click OK. The Free up space option will appear immediately in File Explorer.

OneDrive reverts the file to locally available after every sync

This is almost always caused by a folder-level Always keep on this device setting that you missed. Open the parent folder and all subfolders one level deep. Right-click each folder and check the OneDrive menu. Turn off Always keep on this device for any folder that shows a check mark. After that, free up space on the file again. If the file still reverts, run the OneDrive reset command from step 5 in the previous section.

Files On-Demand States vs Always Keep on This Device: Key Differences

Item Files On-Demand Always keep on this device
Scope Per file or per folder Per folder only
Effect on files File becomes online-only or locally available All files inside the folder stay downloaded regardless of individual file state
Override behavior Overridden by Always keep on this device at the folder level Overrides Free up space on individual files
User interface Right-click file > Free up space or Always keep on this device Right-click folder > Always keep on this device
Storage impact Reduces local disk usage when files are set to online-only Increases local disk usage by keeping all folder content downloaded

Understanding these two settings helps you predict exactly how OneDrive will behave. Always keep on this device is a folder-level override that forces all files inside to remain locally available. Files On-Demand is the underlying feature that makes the Free up space option available. When you need to free up disk space, always check the folder before the file.

You can now identify why Free up space fails and resolve it by turning off the Always keep on this device setting on the parent folder. For persistent issues, use the OneDrive reset command to clear a corrupted sync cache. As an advanced tip, use the OneDrive > Settings > Account > Choose folders option to unselect entire folders from syncing to your device, which removes all local copies at once without dealing with individual file states.

ADVERTISEMENT