Dannymac22 wrote:
The purpose of my question was to ASK how it all works. When I see values that confuse or mislead people, my first assumption is that there is something that I just don't understand. The question still stands.
My answer still stands too.
I can explain how it is supposed to work. Buckle up, buttercup!
I'll break things down into three categories - free storage, snapshots, and categories.
Free storage:
Modern macOS uses the APFS file system. This file system is supposed to be much better at conserving disk space by only writing new data when the old data actually changes. You can duplicate a single file tens of thousands of times with no meaningful loss of disk space.
However, what this means is that no individual file size has any meaning any more. A file listed as 100 MB in size could be 100 MB, or 50 MB, or 20 bytes. Obviously, this problem gets worse when you look at entire folders. The "size" of a folder is now completely meaningless. All of the files in a 10 GB folder could also reside in a different 10 GB folder. But the total size used by both folders is only 10 GB of storage.
If you look around, you'll notice that the operating system never even talks about "free" storage anymore. Instead, it is called "available" storage. People think they mean the same thing, but they are wrong. "Free" storage means that the storage isn't being used. "Available" storage means that the storage actually is being used, but could be deleted if you really need it. How do you decide if you really need it? Trick question - you don't. The operating system decides that, on its own schedule. If you run out of disk space, you will likely get lots of warning about running out of application memory (long story) and storage. So you go off and delete a bunch of files. Maybe you delete 10 GB of files. And yet, your free (or available) storage doesn't change. The problem is that those 10 GB are still being used by other files. In most cases, after a frustrating delay, the operating system will go ahead and delete some of the files it is hanging on to and give you more usable storage. But this always happens a significant time after all of the scary warnings and frantic, but useless, deletions.
The only place to see the actual "free" storage is in Disk Utility and some command-line tools that nobody knows about.
Snapshots:
One of the primary reasons for all this problem is local snapshots. The operating system automatically makes copies of its filesystem on a regular basis. When you delete files, all you are doing it setting a flag to tell the operating system that the file is unwanted. You actually can't delete files at all, by any means. Only the operating system has the right to delete your files. It will not delete any files that still have a pointer to them. So if you have copies of a file and delete one or more copies, nothing gets changed because there is still one, original pointer to the file. APFS local snapshots maintain pointers to ALL files. To delete a file, you may need to delete snapshots, which can only be done via some utility or on the command line.
Categories:
This is probably one of the most frustrating of all problems. When people see categories with names like "System", "Applications", "Documents", they naturally think that these refer to specific directories on the hard drive with the same names. They don't. They have nothing to do with each other.
These categories all come from the Spotlight disk indexing system. Many of these categories are pretty straightforwards and sometimes very specific - Applications, Mail, Message, Photos. No doubt about those. But what about "Documents" or "System data"? In most cases, the "System data" is just a catch-all for any files that couldn't be otherwise categorized.
If you have external hard drives, or mechanical hard drives, then spotlight gets really, really slow. This will cause the "System data" size to balloon because the operating system gives up waiting for Spotlight.
In essence, the data is accurate, unless it isn't. If you can think of a better description than "bogus", I'd love to hear it.