What is ~/Library/CloudStorage ?

I have three items in this directory: /Users/john/Library/CloudStorage

This directory appears to be a local cache for files that are stored in my two cloud services


07:32:30.528 iMac191 ~/Library/CloudStorage 
➜ ls -lLaHPe 
total 32
drwxr-xr-x+   6 john  staff    192 Oct 25  2022 .
 0: group:everyone deny delete
drwx------+ 121 john  staff   3872 Sep 13 15:31 ..
 0: group:everyone deny delete
-rw-r--r--@   1 john  staff  14340 Sep 21 07:27 .DS_Store
drwx------@  26 john  staff    832 Mar 21  2024 Dropbox
 0: group:everyone deny delete
 1: group:everyone deny writeextattr
drwx------@  23 john  staff    736 Aug 28  2023 Dropbox (8-31-23 12:22 PM)
dr-x------@  22 john  staff    704 Sep  3 16:14 iCloudDrive-iCloudDrive (9-3-24 4:13???PM)


Clicking on Dropbox opens the /Dropbox directory


The other two directories don't appear to be symlinks.

Are these just caches of online/cloud documents?

If I delete them will the files just download again when they are needed locally?


I noticed this directory when I was looking through "System Information" and saw four copies of an Automator application that I made.


iMac 27″

Posted on Sep 21, 2024 5:42 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 21, 2024 12:45 PM

johnnyjackhammer wrote:

How do you learn these things?

I learned about the CloudStorage folder when Dropbox announced (many months ago) that it was transitioning from keeping the Dropbox folder in the User primary area to keeping it in the Users/username/Library/CloudStorage folder. Dropbox also warned users against modifying or changing that new folder location directly in any way. The Dropbox folder shows under Locations but that is more or less an alias to the actual physical location which is inside the user's Library folder. That Library folder is nominally hidden (which a user can change so it is visible) to prevent unsuspecting users from changing things that, as etresoft noted, can be "catastrophic."


These recent changes to MacOS that mandate use of that directory in the user's Library folder have caused frustration among some users of cloud storage because some users have so many files in there that they will not all fit on the internal storage of their Macs. Thus they had previously moved their cloud storage folders (e.g. Dropbox) to large external drives, where they wanted a physical copy of the file on local storage. This no longer works, hence user frustration was expressed. Some users tried all kinds of acrobatics to enable cloud storage on external drives but none of these attempts appears to really be successful.


In any case, deleting that cloud storage folder (or its contents) MAY result in deletion of its contents both from local storage as well as online storage. Which is probably not what most users want.


Also, while Time Machine does back up the entire user Library including that cloud storage folder, some "clone" backup programs do not backup that cloud storage folder by default (SuperDuper is one example). This can be overridden by user configuration of backup scripts for those tools, but people should be aware.

8 replies
Question marked as Top-ranking reply

Sep 21, 2024 12:45 PM in response to johnnyjackhammer

johnnyjackhammer wrote:

How do you learn these things?

I learned about the CloudStorage folder when Dropbox announced (many months ago) that it was transitioning from keeping the Dropbox folder in the User primary area to keeping it in the Users/username/Library/CloudStorage folder. Dropbox also warned users against modifying or changing that new folder location directly in any way. The Dropbox folder shows under Locations but that is more or less an alias to the actual physical location which is inside the user's Library folder. That Library folder is nominally hidden (which a user can change so it is visible) to prevent unsuspecting users from changing things that, as etresoft noted, can be "catastrophic."


These recent changes to MacOS that mandate use of that directory in the user's Library folder have caused frustration among some users of cloud storage because some users have so many files in there that they will not all fit on the internal storage of their Macs. Thus they had previously moved their cloud storage folders (e.g. Dropbox) to large external drives, where they wanted a physical copy of the file on local storage. This no longer works, hence user frustration was expressed. Some users tried all kinds of acrobatics to enable cloud storage on external drives but none of these attempts appears to really be successful.


In any case, deleting that cloud storage folder (or its contents) MAY result in deletion of its contents both from local storage as well as online storage. Which is probably not what most users want.


Also, while Time Machine does back up the entire user Library including that cloud storage folder, some "clone" backup programs do not backup that cloud storage folder by default (SuperDuper is one example). This can be overridden by user configuration of backup scripts for those tools, but people should be aware.

Sep 21, 2024 7:16 AM in response to johnnyjackhammer

~/Library/CloudStorage is critical to the operation of cloud services including Dropbox. It is not cache.


Recent versions of macOS require cloud services to use the ~/Library/CloudStorage folder. You should not manually do ANYTHING with this folder. Doing so could corrupt any or all of the cloud services you may be using,


It is not a good idea to go poking around in the Library folder (either top level or user level).

Sep 21, 2024 1:28 PM in response to johnnyjackhammer

johnnyjackhammer wrote:

Thanks for all of that useful info. It's one thing to learn something another to remember it. What you are saying is true... there's an ever increasing list of things to remember for these systems. I always assumed my "stuff" was on Dropbox's servers. I guess that was wrong. It's just a syncing service now ... Cloud storage is especially confusing and so are APFS snapshots and Time Machine links. Nothing is where it says it is anymore.

With Dropbox (I think other cloud storage is similar), there are two ways to store your files:


(1) The files are on Dropbox servers AND a physical copy is kept on your Mac, in that special CloudStorage folder that you can access by clicking on the "Dropbox" alias.

(2) The files are on Dropbox servers but a physical copy is not kept on your Mac until you click a small cloud icon which instructs Dropbox to download a physical copy of that file or folder only to your Mac.


Dropbox allows you to designate method #1 or method #2 for each and every file. This way you can save space on your Mac by keeping the only physical copy of large items on Dropbox servers, and downloading them to your Mac only when needed.


The concern is that manually deleting a file from that CloudStorage folder can be like telling Dropbox to delete it from its server. It may still be recoverable for some period of time from a "deleted items" area on Dropbox, however. However deleting the entire CloudStorage folder or the entire Dropbox folder inside it might disrupt your Dropbox account and your accessibility to any of your Dropbox files.


The other cloud storage providers (Google, O365, Apple ...) may handle these situations similarly or differently. However in reading these Discussions, one frequently sees posts of the type "all my cloud files have disappeared, where are they?" There can be various reasons that this happens, but usually it has to do with user actions that should not have been taken.


As for recent changes to cloud storage, Time Machine snapshots, APFS ... keep in mind that it is possible (likely) that Apple intends for these items to be handled through a high level user interface, without requiring typical users to worry about the details or even to know how these services actually work. I would say that for 99% of users, they are better of not meddling with the details of those services, they should simply access them through the interfaces that Apple provides. Various members of my family have been using Macs for years and gone through multiple generations of Macs and MacOS: they don't know anything about those terms, but they do know that they can recover files through Time Machine, and they use cloud storage all the time without worrying about where the files physically are, and they understand that they can save local storage by making some files stored only in the cloud. And they don't want to know more details about those things.


However I think many readers in these Discussions (including you) fall into that other 1% who wants to understand more about how their computers work. Sometimes, of course, a little bit of knowledge can be a dangerous thing. We have seen people repeatedly running Disk first Aid, and in response to innocuous warning, proceeding to try to erase/format their drives and then get hung up being unable to restore them to how they were, when things were actually working fine. Or people buy software like CleanMyMac to try to "optimize" things and end up damaging their systems and even losing files or data.


Personally, I would like to better understand things like APFS but I have done a lot of reading about it and have mostly given up: if an APFS disk appears to be damaged, my only recourse is to replace it or to erase/format it and restore from a backup. And I don't care to understand Time Machine more than just knowing how to restore files, which for me it has always done very nicely.

Sep 21, 2024 10:19 AM in response to johnnyjackhammer

johnnyjackhammer wrote:
Cool. Thanks for the explanation. I am so glad I asked before acting.
How do you learn these things?

You just pick up knowledge as you explore, have experiences & ask questions. In my own case, I have been using Macs for over 20 years, ever since the first release of OS X. These forums have helped me a lot over all that time.


Just like the reason you asked your initial question, there was something you didn't understand and you asked people to help explain it to you. There are lots of good people here in the Apple Communities and they have a wealth of knowledge & experience. Never be shy about asking questions.

Sep 21, 2024 1:03 PM in response to MartinR

@Martin R


I am not shy about asking. I don't understand responses telling me not to "poke around". That feels patronizing to me. I never understand why it's allowed on the Apple forums when it would be flagged and removed on Stack as it contributes nothing to the solution. Coming from someone who has done exactly that in order to learn what they know... hmmm, that is exactly what it takes to learn anything. I have been using mac since 1984... so 40 years. I just have a hard time remembering the interactions and limitations of each piece of software I have on my system when they are updated every 6 months. Cloud storage is especially confusing and so are APFS snapshots and Time Machine links. Nothing is where it says it is anymore.


Thanks again

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What is ~/Library/CloudStorage ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.