I'd like to use iCloud Drive to sync my documents + desktop.

However, many times it will remove projects while I'm still working on them (even small ones, like 10MB).

Is there some sort of flag that will tell macOS to sync a folder, but never remove it until I say so?

Mind that I wouldn't like to not sync a certain folder, I'd like to keep macOS from removing it to create purgeable space.

  • Is using iCloud Drive a requirement or can you use something like Dropbox or Google Drive?
    – fsb
    Commented May 23, 2017 at 21:27
  • iCloud allows me to save disk space, while other solutions don't. Not that it works that well, unfortunately... :-/
    – nkkollaw
    Commented May 25, 2017 at 8:47

2 Answers 2


As of macOS Sierra 10.12.4, it is not possible to flag individual folders to stay on your local drive at all times. This is an all-or-nothing toggle.

You may access it under System PreferencesiCloudiCloud Drive Options… There, uncheck Optimize Mac Storage.

This will prevent your files/folders backed by iCloud from being purged automatically from the local storage.

  • Is there a way to do the same on iOS and iPadOS?
    – YOUNG
    Commented Oct 23, 2020 at 11:45
  • 2
    For macOS Big Sur to access Optimise Mac Storage head to  → System Preferences → Apple ID → Click on iCloud in the sidebar → uncheck Optimise Mac Storage. As soon as you do so, it will start pulling everything from the cloud. For me this is very good as I have 2 TB drive and I want my Time Machine backups to include everything I have within my Documents. Commented Jan 24, 2021 at 12:10
  • The issue I have is iCloud tries to then download absolutely everything, even after I select "Remove Download" on a large number of files, filling up my local hard drive
    – moth
    Commented Jan 31, 2023 at 4:11

You can add '.nosync' to any file/folder name to prevent syncing. The element will only be saved in your local harddrive. (Works in Sierra, High Sierra, maybe other versions...not confirmed)

  • Oh, great! I wonder why it's not documented...
    – nkkollaw
    Commented Aug 27, 2017 at 15:43
  • Found a link that mentions it: developer.apple.com/library/content/documentation/General/… under A User’s iCloud Storage Is Limited
    – nathan
    Commented Aug 27, 2017 at 15:57
  • 7
    Well this also prevents the folder from being backed up to iCloud Drive altogether. The pain point from OP is addressed but a new one is created.
    – DavidD
    Commented May 18, 2018 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .