guide · static export
Software

Free Up Disk Space with OneDrive Files On-Demand

Keep the folder tree but not the bytes: what each icon means, how to dehydrate a large directory in one command, and how to pin what must work offline.

by@guidox updated:10/31/26 time:10 min level:Beginner tested on:Windows 11 24H2 works on:Windows 10, Windows 11 tools:File Explorer, Command Prompt
TL;DR

Right-click a folder and pick **Free up space** to turn files into cloud placeholders. `attrib +U -P /s` does the same for a whole tree, and **Always keep on this device** pins the files you need offline.

Before you start

Requirements

  • OneDrive signed in
  • An NTFS local disk
  • Ten minutes
Step by step

Instructions

01

Confirm the feature is on

Files On-Demand is a property of the sync engine. Without it every file is a real file and no placeholder can exist.

reg query HKCU\Software\Microsoft\OneDrive /v FilesOnDemandEnabled
tipA value of 0x1 means enabled. A missing key only means OneDrive has never been opened in this profile.
02

Learn the three icons

A cloud means online only, a green tick means downloaded and pinned, two blue arrows mean syncing. Opening a cloud file downloads it and turns the icon into a tick, which is how the folder grows again without a warning.

03

Free space on one folder

The context menu action dehydrates everything inside and leaves the names and the structure in place. The files stay in the cloud, only the local copy disappears.

Right-click > Free up space
04

Dehydrate a large tree at once

The attribute tool changes the pin state for a whole directory without opening it. U means unpinned, P means pinned, and s makes it recursive.

attrib +U -P /s
⚠ warningRun it inside the folder you mean, not at the root of the profile. It touches placeholder state only; the cloud copies are not deleted.
05

Pin what must work offline

The reverse command downloads everything below the current directory and keeps it. Do this before a flight or a trip, not on the train.

attrib -U +P /s
06

Verify the space is really free

Measure the folder after the sync engine has finished, not while it is still releasing blocks. Explorer shows size on disk next to size, and the gap between them is what you gained.

Get-ChildItem $env:USERPROFILE\OneDrive -Recurse -File | Measure-Object Length -Sum
tipThe recycle bin holds dehydrated files until it is emptied, and the sync client needs a minute to release the space.
Troubleshooting

Common issues

Files On-Demand is greyed out

The location is not NTFS or not local. A FAT32 stick or a mapped network folder cannot hold placeholders.

0x8007016A the cloud file provider is not running

OneDrive crashed. Restart it from the tray, and use OneDrive.exe /reset if the error comes back.

Space did not increase

Pending uploads keep the local copy alive. Wait for the sync to finish, then dehydrate again.

A pinned file became a placeholder

Storage Sense with the OneDrive rule can dehydrate pinned files. Turn that rule off in Storage settings.

FAQ

Frequently asked

Do placeholders break other programs?

Normal reads work. Backup tools that copy the raw stream can upload the placeholder instead of the content.

Does deleting a placeholder delete the cloud file?

Yes. The placeholder is the file, and it goes to the OneDrive recycle bin.

How to undo this

attrib -U +P /s inside the folder downloads every file again. Turning the feature off in OneDrive settings keeps the local copies and stops new placeholders from being created.

Changelog · 1 entry
  1. 2026-10-31
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress