Delete a file locally, but keep it in iCloud

As Andreas mentioned in his answer, brctl evict purges the files. But for me, it seems to work permanently. Even purges recursively through folders. Maybe it is because I purged 40GB of data, hard for iCloud to reset in a heartbeat

>brctl evict SuperBigNestedFolder
evicted content of 'SuperBigNestedFolder/'

Nice!

BUT, when iCloud evicts the files it also throws away all metadata. This cripples Spotlight by removing the ability to search for text found inside popular file formats such as word, pdf, pages, keynote, or txt.


A nice finder extension does the trick~

https://github.com/Obbut/iCloud-Control


macOS Catalina (10.15) has this feature:

Right click on a file or folder in iCloud, there are either:

  • "Download Now": Download the iCloud file
  • "Remove Download": Remove the file locally (keeps it in iCloud)