Files on demand, automatic cleanup
When using files on demand over time, OneDrive will start to sync a lot of files which after some time will become inactive. Today the user would have to right-click the OneDrive-folder and select Clean up in order to stop the sync of these files and delete the local files stored on the user's device.
I propose a new optional feature. When files or folders have been inactive for a period of time (say 30 days) I would like OneDrive to automatically clean up, deleting the locally stored files and folders but still keeping them in the cloud.
It should be possible to enable or disable this feature, and also change the how often the OneDrive client should perform the cleanup (ex. every week, every other week, every month).

Windows Storage Sense in RS5 now has the capability to automatically free up disk space by making older, unused, locally available OneDrive files be available online-only. You can read more about how to do this here:
https://techcommunity.microsoft.com/t5/Storage-at-Microsoft/Windows-10-and-Storage-Sense/ba-p/428270
78 comments
-
Martin Kallenbach commented
Would like to see a quota of storage to be used for offline synch. So setting this to 1GB e.g., and OneDrive will use that space to keep the last recently used files available, and remove the files not used from the local drive.
-
Anders Horgen commented
This is an great idea!
It should be possible to enable / disable this feature with GPO and at the same time define the inactive period.
When the CleanUP process occours, it also could be an idea to notify the end user in systemtray ? This notification should be possible to enable / disable via GPO
-
Anonymous commented
Why onedrive keeps deleting my files automatically and sending them to recycle bin despite restoring. It's becoming a pain now./
-
Anonymous commented
Would love to see this feature. I asked about it at SharePointNA in Vegas.
-
Lois A. Heichberger commented
Love this idea, especially with the options described in Victor’s comment from May 10, 2018.
-
Lois A. Heichberger commented
Totally love and need this feature.
-
Victor commented
"It should be possible to enable or disable this feature, and also change the how often the OneDrive client should perform the cleanup (ex. every week, every other week, every month)."
It is really important that, if you enable such feature, can be easily managed via GPO, because it would ruin all our configuration if files stopped being present locally in 30 days or even more without warning.
-
Anonymous commented
Another option maybe... limit the file on demand cache by disk size and age. Drop the oldest cached file if you need to cache something new if you exceed X size.
-
Alan commented
I'm in favor of the automatic cleanup of the local files. Without this we risk capacity issues with virtual desktops.
-
Anonymous commented
I believe this is NECCESSARY for virtual environments. Both stateless and stateful will take a big performance hit if 100% file data is being pushed on every login.
-
zyga commented
the functionality you are talking about is completely covered by 3rd party application: odrive
unfortunately it adds 100$/y to the cost of onedrive -
Michael commented
this would be great for photos - example the last 1000 pics are in sync with all devices - offline - phone, tablet, laptop, pc - but on the phone it deletes the latest pictures because of the limited storing capacity. but always keep everything in the cloud
-
Bradavon commented
Good idea
-
Ray Osman commented
I agree, it would be great feature.
-
Anonymous commented
Over a thousand votes not not a peep from anyone form MS? What gives? At the very least tell us you think this is dumb and will not be considering? Then we could all just move on with our lives...
-
Anonymous commented
Agreed, we desire to minimize OD content on the local drive so as you we desire "locally available" files have an alternate cleanup frequency rather than just space constrainsts.
-
Anonymous commented
What we need (windows version):
- User should can synchronize OneDrive Folders to Diffrent Locations (per Folder)
- User should can choose type of Synchro OneDrive Folders (per Folder) - One with Offline Copy, Other with Files on Demand. -
Nicki Messerschmidt commented
That would be an awesome feature!
-
Andreas Ehlert commented
Bitte unbedingt umsetzen
-
Anonymous commented
Absolutely agreed! We would love to be able to "free up space" daily and are currently doing this with scripting of the attrib +U -P /s command but this is messy.
Build it into the client and allow us to control it via group policy/intune!