Disk Cleanup does not delete cloud copies in OneDrive, but it can remove local cached files, and placeholders may return later or download again when you open them. If you clear the wrong boxes, you can lose offline access and spend time pulling the same data back down. This guide maps the exact OneDrive state changes, what stays in the cloud, and the safest ways to free local space.
Disk Cleanup and OneDrive file states
Disk Cleanup is a Windows built-in cleanup tool that works on a drive basis. It removes local data from the selected drive, including some synced files, but it does not reach into OneDrive cloud storage and erase the online copy by default. That is the split to keep in mind.
OneDrive sync links your PC and the cloud, so changes in a synced folder can move both directions. That does not mean every cleanup action is a cloud delete. It means the file state matters first.
What happens to OneDrive files?
If a file is online-only, Disk Cleanup can remove any local placeholder or cache tied to it, but the cloud file stays in OneDrive. If a file is stored locally, Disk Cleanup may free that local space, and the file can still remain in the cloud if it is part of a synced OneDrive folder.
Always available files behave differently from online-only files. They stay on the PC and use space until something changes their state, such as Storage Sense or a manual Files On-Demand action.
Shared folders need extra care. If you delete a synced shared item instead of making it online-only, OneDrive says that delete affects everyone who has that item. (Microsoft Support)
Online-only files
Online-only files are the space-saving state. They do not take up space on the device, and File Explorer shows a blue cloud icon for them. Opening one downloads it to the device, so local space can rise again after use.
Locally available files
Locally available files can be opened offline, but they still occupy local storage. They are not the same as a true cloud-only placeholder. If you want to free space, you need a tool or setting that turns them back into online-only files.
Always available files
Always keep on this device files are stored locally and use space. File Explorer shows a green circle with a white check mark for this state. Disk Cleanup can remove other local junk, but it does not turn an always available file into online-only by itself.
Pinned shared folders
A pinned shared folder is still part of the sync relationship. If it is marked to stay on the device, it keeps local space in use. If you remove it with the wrong action, you can affect the shared copy as well.
Unsynced local folders
Files outside the OneDrive folder are not part of the cloud sync path. If you keep a file on your PC but not OneDrive, move it outside the OneDrive folder. That breaks the sync link and keeps the local copy separate.
Files On-Demand and storage icons
Files On-Demand lets OneDrive show all your files without downloading them all. The icons tell you which files are local and which files still live only in the cloud. The blue cloud icon commonly means online-only, and the green circle with a white check mark commonly means always available locally. Locally available files sit between those two states.
Storage Sense works alongside Files On-Demand. It can automatically remove items like temporary files and Recycle Bin items, and it can also move locally available files back to online-only after a selected time period.
Blue cloud icon
The blue cloud icon means the file is online-only. It is visible in File Explorer, but it does not use local storage until you open it. If Disk Cleanup removes other cached pieces around it, the cloud copy still remains.
Green check icon
The green circle with a white check mark means the file is always available locally. It is fully stored on the PC and can be opened offline. That local copy remains until you change the file state or remove the local copy through a cleanup path that targets it.
Local access versus cloud-only access
Locally available files can be opened offline, but they still take up room on the drive. Online-only files stay in the cloud until you need them. That is why a cleanup can look complete, then seem undone later if an app opens the same files again.
Say your 8 GB project folder is marked locally available and an editor app opens three files after cleanup. Those files can download again, so your free space drops back faster than expected. The cloud copy never vanished; the device simply needed the files again.
When local space comes back
Local space comes back when the PC stops keeping a local copy. Disk Cleanup can remove local copies tied to the selected drive, Storage Sense can change file states over time, and File Explorer can free a file manually with Free up space. The cloud copy remains unless you actually delete it in OneDrive.
Disk Cleanup on synced folders
Disk Cleanup works at the drive level. If a OneDrive file has a local copy or cache on that drive, the tool can usually reclaim that local space without deleting the copy stored online. That is why it is safer than deleting from File Explorer when your goal is only local space.
Storage Sense timing
Storage Sense can change locally available files back to online-only after the selected time period. It works with Files On-Demand, so it can reduce local usage after a delay instead of immediately. This is useful if you want the file to stay available for a while, then shift back to the cloud.
Free up space in File Explorer
Free up space is the Files On-Demand action that turns a local copy back into online-only. It keeps the OneDrive item in the cloud and removes the local copy. That is different from deleting the file, which can affect both the device and the cloud for synced items.
OneDrive state table
This table shows the local-versus-cloud result for the main file states readers run into during cleanup. Use it to match the icon or folder type before you run Disk Cleanup, Storage Sense, or Free up space.
| File state | Disk Cleanup effect | File Explorer delete effect | OneDrive cloud effect | Offline access | Space reclaimed |
|---|---|---|---|---|---|
| Online-only | Can remove local placeholder or cache on the selected drive | Usually removes the local entry; cloud copy stays unless deleted in OneDrive | Stays in OneDrive | No, until opened and downloaded | Little to none if it was already online-only |
| Locally available | Can free local storage tied to the file on that drive | Deletes the local copy; if synced, the cloud relationship can also be affected | Stays unless you delete the synced item | Yes, until it is turned back into online-only | Yes, if the local copy is removed |
| Always available | Can remove other drive cleanup items, but the file itself stays local unless changed | Deletes the local copy; synced deletion can affect the cloud copy too | Stays unless deleted from OneDrive | Yes | Yes only if the local copy is actually removed |
| Pinned shared folder | May free local space if the folder is converted back to online-only | Deletion can affect shared access for everyone | Shared cloud item stays only if you did not delete it | Depends on the current state | Yes, if local copies are removed |
| Unsynced local folder | Can remove local data if the folder is on the selected drive | Removes only the local file | No OneDrive cloud copy | Depends on whether the file still exists locally | Yes, local space only |
How to clean safely
The safest path is to check the file state first, decide whether you want to free local space or delete the file entirely, and then use the tool that matches that goal. Personal OneDrive, work or school OneDrive, and shared folders do not behave the same way when you delete them.
- Check the file icon.Look for the blue cloud or green check mark in File Explorer before you clean. That tells you whether the file is online-only or stored locally, which changes how much space you can reclaim.
- Decide your target.If you want the file to stay in OneDrive but leave the PC, use Free up space or Files On-Demand. If you want the file off both the device and the cloud, delete it from the synced location and then empty the Recycle Bin if needed.
- Protect shared folders.Check whether the folder is shared before deleting anything. OneDrive says a deleted shared item deletes for everyone, so a shared folder needs a different approach than a private personal file.
- Watch for re-downloads.After cleanup, open the files only if you need them. Apps, sync activity, or backup tools can pull local copies back down, which makes it look like cleanup failed even though the cloud copy stayed intact.
Picture a 20 GB work folder backed up with OneDrive on Windows 11. If it is set to always available, Disk Cleanup will not turn it into cloud-only storage. If you first use Free up space, the folder can return to online-only and reclaim local room without removing the website copy.
OneDrive folder backup syncs computer files and folders with OneDrive, and it supports personal and work or school accounts. Windows 11 commonly includes OneDrive preinstalled, so some users may already have this link active before they start cleaning.
Frequently asked questions
Will Disk Cleanup delete my OneDrive files?
Not by default. Disk Cleanup targets local drive space, so it can remove local copies and cache, but it does not delete the OneDrive cloud copy just because a file lives in a synced folder. If you want the file gone everywhere, delete it from OneDrive itself.
What happens to OneDrive files On-Demand when I run disk cleanup?
Files On-Demand states still matter. An online-only file stays in the cloud, while a locally available or always available file may lose local space if cleanup removes the local copy. If the file is opened later, OneDrive can download it again to the device.
Does Disk Cleanup free up space in OneDrive folders or just on my PC?
It frees local space on the PC. The cloud copy stays unless you delete it from OneDrive. For synced folders, the main question is whether the file is only local, cached locally, or fully mirrored for offline use.
If I select files in a synced folder, will they be removed from the cloud too?
They can be, depending on the action. Deleting a synced file in File Explorer can affect both the device and the cloud. Making it online-only is different: that removes the local copy while keeping the OneDrive copy intact.
How do I tell whether a OneDrive file is online-only or stored locally?
Use File Explorer icons. The blue cloud means online-only. The green circle with a white check mark means always available locally. Files with local availability can still open offline, but they continue using device storage until something changes their state.
Can I safely use Free up space instead of Disk Cleanup on OneDrive files?
Yes, when your goal is to keep the file in OneDrive and remove only the local copy. Free up space is the direct Files On-Demand action for that job. It is safer than deletion because it keeps the cloud copy and avoids accidental shared deletions.