I have my Documents folder synced with iCloud drive, I want to exclude some sub folders from the iCloud drive is there a way to achieve this?


Adding one empty file named .nosync to a folder will prevent that folder from syncing.

You can also use this as a file extension to specific files, but the folder treatment is quite useful.

Once you've had a folder sync, you can now also prevent it from syncing on some (or all endpoints) with a utility named Bailiff, if for some reason you don't want just to delete the files from iCloud entirely and instead want to prevent the next "initial" sync.

  • 6
    what if you put a hidden .nosync file in the folder will that also stop the folder from syncing? – malhal Aug 19 '17 at 17:03
  • It works! Brilliant! It does indeed stop the folder. Even after the fact. I just tried it. +1 from me – bjbk Aug 22 '17 at 1:37
  • 1
    I want to avoid syncing a "build" folder too. In that case, I cannot change the name of that folder. – John Pang Jan 7 '18 at 9:31
  • Finally! I've dropped an empty iCloud.nosync file (don't like invisible files) into every folder I don't want in iCloud --mainly because my trusty old BBEdit crashes every time I try to open or search one of them cloud files. Works instantly, peace has returned. – Elise van Looij Jan 11 '18 at 18:18
  • This is not really accurate. The directory continues to sync up when a .nosync file is added; additionally, iCloud even seems to behave like the contents of the directory are uploading, and may even take up space, though I don't want to risk losing space that will never return, as I've seen many reports of space never de-allocating. The directory will show up in iCloud, though appears empty. In Finder, the .nosync file will be deemed "inelligible," but all the other files are considered "Downloaded." This is is disconcerting. Compare: i.imgur.com/uYybYAK.png – danemacmillan Jul 9 '18 at 17:12

Here are all the file/folder names excluded so maybe one of these could be used for a workaround:


  • is .DS_Store
  • begins with (A Document Being Saved
  • contains .nosync (in any case)
  • is .ubd
  • contains .weakpkg
  • is tmp (in any case)
  • is .tmp (in any case)
  • is desktop.ini (in any case)
  • begins with ~$
  • is Microsoft User Data (in any case)
  • is $RECYCLE.BIN (in any case)
  • is iPhoto Library (in any case)
  • is Dropbox (in any case)
  • is OneDrive (in any case)
  • is IDrive-Sync (in any case)
  • is .dropbox (in any case)
  • is .dropbox.attr (in any case)
  • is icon\r (in any case)

Extension is (in any case):

  • tmp
  • photoslibrary
  • photolibrary
  • aplibrary
  • migratedaplibrary
  • migratedphotolibrary
  • migratedaperturelibrary

Extension is more than 2 chars and filename is ~

Source: reversing iCloud daemon.

Hopefully in a future version of the OS they let us put .nosync inside the folder to exclude it, or have an .IgnoreList like Resilio has.

  • 1
    That's helpful, but can you please also add a source to your answer? – mklement0 Jan 9 '18 at 13:12
  • 1
    iCloud Drive also excludes symlinks ("aliases"). – twhb Jul 9 '18 at 20:09

It looks like directories that are named "tmp" or end with ".tmp" are not synced. A cloud icon with a line through it appears next to the directory along with anything inside of it.


I just create folders directly under my user home that I want to keep only locally (separate from my iCloud folders).


Rename the folder or file:

mv fileorfolder fileorfolder.nosync

Create a symlink that get's synced:

ln -s fileorfolder.nosync fileorfolder

Repeat on every machine.


I created this Automator workflow to do it from the context menu in Finder https://github.com/tsdexter/iCloud-NoSync

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.