How do I optimise "System Data" storage space on my MacBook running macOS Sonoma?

I'm using a MacBook Pro M2 with Sonoma 14.5, 512 GB SDD.


When analyzing disk space using System Settings -> General -> Storage, there are 240 GB shown as "System Data" (which means, no applications, no user data or anything else in charge of the user).

I can also use the "Disk Space Analyzer" for the whole drive, which shows over the half of the drive as "Inaccessible Disk Space".



I there any way to exactly identify where this space is used? Why is it inaccessible? I want to clear this space.


(I'm a software developer, please be as technical and precise as possible)


[Re-Titled By Moderator]

MacBook Pro 14″

Posted on Aug 3, 2024 11:28 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 4, 2024 6:49 AM

Krangerich wrote:

When analyzing disk space using System Settings -> General -> Storage, there are 240 GB shown as "System Data" (which means, no applications, no user data or anything else in charge of the user).

Actually it just means "other". It can be literally anything at all.


I can also use the "Disk Space Analyzer" for the whole drive, which shows over the half of the drive as "Inaccessible Disk Space".

I don't know what the "Disk Space Analyzer" is. Modern Macs use the APFS filesystem, which makes most traditional filesystem techniques technically useless. In many cases, you can still get plausible and useful results, but don't get arrogant. At a technical level, they're all wrong.


I there any way to exactly identify where this space is used? Why is it inaccessible? I want to clear this space.

Exactly? No. There is no exact way. You can get close enough to resolve major problems though. But the nature of how Apple uses the APFS filesystem makes it extremely difficult to answer why it is inaccessible. There are multiple possibilities.


(I'm a software developer, please be as technical and precise as possible)

Oh goody!


First of all: Any responses in the past threads that were like "no, it's not possible, the holy OS needs 1.5 TB of your expensive 2 TB" are straight up wrong and misleading. The OS just needs a few GB.

Those responses are accurate. While the OS itself only occupies a few GBs of storage, you will find it most trouble free when you keep 100-200 GB of free storage. (Note that the word "free" is a loaded term on APFS. I didn't mean "available".)


It's possible to use command line tools in order to identify, where all the space is gone. A good place to start is the /private/var directory:

du -ah /private/var 2>/dev/null | sort -rh | head -n 20

As I said above, this is a practical method to identify major problems. I do something similar in EtreCheck. But you did specifically say that you were a developer and wanted information "as technical and precise as possible". So in that context, it's wrong. It will find most directories that have noticeably larger usage than others, but, in many cases, that's only part of the problem.


The best you can do is find the total size of the physical device, subtract the free space, and then subtract the results of your "du". There will usually be some non-zero amount of storage remaining. Depending on how you did the above, that could be explained by several different factors, such as: other users, lack of Full Disk Access, APFS local snapshots, and data vaults.


A few years ago, it seemed like the answer was always APFS local snapshots. But more recently, the cause seems more often to be poorly-made 3rd party software gobbling up storage unnecessarily.


Also note that while your "du" search will usually be useful, that, too, is inaccurate. The copy-on-write architecture of APFS means that multiple files can share the same space. It's similar to hard links on other unix operating systems, but not quite. The sharing takes place at the block level, not the file index level. So it is possible that two files could only share 90% (or any value) of storage.


In my case, the culprit was multipass (custom tool, don't scratch your head what it could be), which for whatever reason accumultated >190GB of space. I just purged all instances and the space was reclaimed.

So in other cases, it will be some other thing that went out of control (VM images, docker images, time machine backups, ...), but you'll be able to figure out with that.

Never heard of multipass. I'm scratching my head about what it could be. A CLI to launch and manage VMs on Windows, Mac and Linux that simulates a cloud environment with support for cloud-init? A login for store owners who have a separate website and a Shopify store? A business account for global payments? A program offered to students under agreements in place between TransLink, participating colleges/universities and their associated student societies, and the Province? A multiband modular Snapin Host which splits the incoming signal into up to five frequency ranges which can have effects chains added to them separately? Or a triptych of images featuring Mickey and Minnie's Runaway Railway, Star Tours and The Twilight?

12 replies
Question marked as Top-ranking reply

Aug 4, 2024 6:49 AM in response to Krangerich

Krangerich wrote:

When analyzing disk space using System Settings -> General -> Storage, there are 240 GB shown as "System Data" (which means, no applications, no user data or anything else in charge of the user).

Actually it just means "other". It can be literally anything at all.


I can also use the "Disk Space Analyzer" for the whole drive, which shows over the half of the drive as "Inaccessible Disk Space".

I don't know what the "Disk Space Analyzer" is. Modern Macs use the APFS filesystem, which makes most traditional filesystem techniques technically useless. In many cases, you can still get plausible and useful results, but don't get arrogant. At a technical level, they're all wrong.


I there any way to exactly identify where this space is used? Why is it inaccessible? I want to clear this space.

Exactly? No. There is no exact way. You can get close enough to resolve major problems though. But the nature of how Apple uses the APFS filesystem makes it extremely difficult to answer why it is inaccessible. There are multiple possibilities.


(I'm a software developer, please be as technical and precise as possible)

Oh goody!


First of all: Any responses in the past threads that were like "no, it's not possible, the holy OS needs 1.5 TB of your expensive 2 TB" are straight up wrong and misleading. The OS just needs a few GB.

Those responses are accurate. While the OS itself only occupies a few GBs of storage, you will find it most trouble free when you keep 100-200 GB of free storage. (Note that the word "free" is a loaded term on APFS. I didn't mean "available".)


It's possible to use command line tools in order to identify, where all the space is gone. A good place to start is the /private/var directory:

du -ah /private/var 2>/dev/null | sort -rh | head -n 20

As I said above, this is a practical method to identify major problems. I do something similar in EtreCheck. But you did specifically say that you were a developer and wanted information "as technical and precise as possible". So in that context, it's wrong. It will find most directories that have noticeably larger usage than others, but, in many cases, that's only part of the problem.


The best you can do is find the total size of the physical device, subtract the free space, and then subtract the results of your "du". There will usually be some non-zero amount of storage remaining. Depending on how you did the above, that could be explained by several different factors, such as: other users, lack of Full Disk Access, APFS local snapshots, and data vaults.


A few years ago, it seemed like the answer was always APFS local snapshots. But more recently, the cause seems more often to be poorly-made 3rd party software gobbling up storage unnecessarily.


Also note that while your "du" search will usually be useful, that, too, is inaccurate. The copy-on-write architecture of APFS means that multiple files can share the same space. It's similar to hard links on other unix operating systems, but not quite. The sharing takes place at the block level, not the file index level. So it is possible that two files could only share 90% (or any value) of storage.


In my case, the culprit was multipass (custom tool, don't scratch your head what it could be), which for whatever reason accumultated >190GB of space. I just purged all instances and the space was reclaimed.

So in other cases, it will be some other thing that went out of control (VM images, docker images, time machine backups, ...), but you'll be able to figure out with that.

Never heard of multipass. I'm scratching my head about what it could be. A CLI to launch and manage VMs on Windows, Mac and Linux that simulates a cloud environment with support for cloud-init? A login for store owners who have a separate website and a Shopify store? A business account for global payments? A program offered to students under agreements in place between TransLink, participating colleges/universities and their associated student societies, and the Province? A multiband modular Snapin Host which splits the incoming signal into up to five frequency ranges which can have effects chains added to them separately? Or a triptych of images featuring Mickey and Minnie's Runaway Railway, Star Tours and The Twilight?

Aug 4, 2024 12:30 AM in response to Krangerich

Luckily, I found a solution and want to share it.


First of all: Any responses in the past threads that were like "no, it's not possible, the holy OS needs 1.5 TB of your expensive 2 TB" are straight up wrong and misleading. The OS just needs a few GB.


It's possible to use command line tools in order to identify, where all the space is gone. A good place to start is the /private/var directory:


du -ah /private/var 2>/dev/null | sort -rh | head -n 20


This gives a first idea, where big directories are and what could be responsible for this. There are more sophisticated tools. I used gdu, but there are a lot of alternatives listed.

You can easily browse everything with it, even "system data". Just be aware, that some space can be accounted twice (e.g. /Users will also be listed in /System/Volumes).


In my case, the culprit was multipass (custom tool, don't scratch your head what it could be), which for whatever reason accumultated >190GB of space. I just purged all instances and the space was reclaimed.


So in other cases, it will be some other thing that went out of control (VM images, docker images, time machine backups, ...), but you'll be able to figure out with that.


[Edited by Moderator]

Aug 4, 2024 1:01 AM in response to Ozzie1910

The "System Data" summarized in the storage overview is no system data. It's a catch-all summary for all data, that MacOS cannot account for based on the rather simple categories (Applications, Bin, Documents, Mail, ...).


It includes docker images, multipass instances, probably even everything related to homebrew and much more thats clearly no "system data". Developers will understand.

Aug 4, 2024 4:57 AM in response to Krangerich

When analyzing disk space using System Settings -> General -> Storage, there are 240 GB shown as "System Data" (which means, no applications, no user data or anything else in charge of the user).

That is a good assumption and probably what it should not be, but that’s not what it may be. A better definition is, “everything that Spotlight cannot categorize into the other named categories.”

The most common culprits are Time Machine local snapshots and some app that has gone out of control (caches sometimes).


Yes, you can use the Unix utilities to find chunks of used space, but things like GrandPerspective and OmniDiskSweeper are easier for everyone to use (free, too). There are others, but I have only used those two. I prefer the graphical approach of GrandPerspective over the numerical listing of OmniDiskSweeper.

Aug 4, 2024 5:20 AM in response to Krangerich

Being a Developer, one can appreciate that all Third Party Disk Analyzer are not created equal


Some are better than others and some are garbage


My favourite for getting a Better Overview of both the Computer and the Software on the computer , outside of those already mentioned by @Barney-15E


Thanks to a respected contributor and developer


 Etrecheck ( External Link ) directly from the Developer.


Aug 4, 2024 2:31 AM in response to Krangerich

If the user had the answers before posting the question


Then why the question at all ?


" How do I optimise "System Data" storage "


Optimize storage space on your Mac


The final word from Apple on Managing the " System Data “ Category


System Data: Contains files that don’t fall into the categories listed here. This category primarily includes files and data used by the system, such as log files, caches, VM files, and other runtime system resources. Also included are temporary files, fonts, app support files, and plug-ins. 


You can't manage the contents of this category. The contents are managed by macOS, and the category varies in size depending on the current state of your Mac.


There are areas of the Operating System which we users have control over and that is the User Account Folder ( Home Folder )


Aug 3, 2024 11:35 PM in response to Krangerich

Would u like to know What is storage in system data , the logs and cache of every app you have installed and apps from macOS , macOS logs, cache and analytics , nobody can access that to delete because the only way to delete that is erasing all Mac and reinstalling the macOS as new but with the past of the time system days will get back everything I mention above ⬆️

Aug 4, 2024 3:24 AM in response to Owl-53

Please understand that Apple and Apple Support target non-technical users, which use Macs just for consumer tasks like consuming or producing media files.

As a developer (as written in the original post), which are generally expected to understand technical terms and the Unix environment, that MacOS runs on, I was specifically targeting other developers in order get a more substancial insight. My apologies that my advanced terminology might have confused you.



The user did not have the answer before asking the question, but was able to find a solution on its own after asking the question because of his exceptional skills. If required, he is happy to translate the sentence "Luckily, I found a solution and want to share it" into simple language.

Aug 4, 2024 4:25 AM in response to Krangerich

We seem to have gone Sideways from the Original Question  “ How do I optimise "System Data" storage space on my MacBook running macOS Sonoma?”


A reasonable reply with a link  from Apple has been provided 


To answer some of the other Not Technical Aspects of the reply.


“ Please understand that Apple and Apple Support target non-technical users, which use Macs just for consumer tasks like consuming or producing media files. “


Sorry, First incorrect assumption. 


There are many Users / Contributors with extensive technical knowledge and experience on many different Platforms outside to macOS.


Though, generally we restrict the discussions to Only Apple Operating Systems / Services,  as that is the sole purpose of the Apple Hosted Forums 


Yes, generally those who frequent these ASC Forums, fall into two categories.


Those who have a Technical Apple Questions and those to offer Apple Technical Suggestions / Solutions to specific issues 


“ As a developer (as written in the original post), which are generally expected to understand technical terms and the Unix environment, that MacOS runs on, I was specifically targeting other developers in order get a more substancial insight. “ 


As for Developers frequenting these Apple Support Community Forums - not so much


They would normally post their question(s) in the appropriate Apple Forum Apple Developer Forums


Yes, there is 1 Developer I know of who does develop applications for macOS and does frequent these Forums from time to time


But they too, come to the forums wearing a different Hat, to offer Technical Solutions to Apple Technical Questions 


“  My apologies that my advanced terminology might have confused you. “


No need to for apologies. 


The  terminologies used,  did not confuse me, a Non Developer  


 “ The user did not have the answer before asking the question, but was able to find a solution on its own after asking the question because of his exceptional skills


Good for the User ( Developer)  whoever he/ she may be


Aug 4, 2024 7:07 AM in response to Krangerich

Krangerich wrote:

Please understand that Apple and Apple Support target non-technical users, which use Macs just for consumer tasks like consuming or producing media files.

That's certainly true. However, the people who answer questions here on the Apple Support Community are the most knowledgeable people regarding how the operating system works at an architectural level.


As a developer (as written in the original post), which are generally expected to understand technical terms and the Unix environment, that MacOS runs on, I was specifically targeting other developers in order get a more substancial insight. My apologies that my advanced terminology might have confused you.

Most developers are clueless about such issues and should not be used as a reference. Plus, Apple doesn't document any of this information at an architectural level. They do a little bit of marketing information and they publish APIs for developers, but that's it. And these days, even those APIs are often little more than just the method signature, with no description at all. You're lucky if even the header file has more information.


Earlier, someone referred you to the Apple Developer forums. I would not agree with that recommendation. For these kinds of system-level questions, they would just refer you back over here. The Apple Developer forums are supposedly designed for code-level questions regarding Apple APIs. But in practice, there are very few such questions posted. If you spend any time reading questions there, you will come away with a greatly diminished opinion about the technical competence, and ethical standards, of developers on Apple platforms.


From what you describe, you seem more like an end-user of Apple products. While you are using certain virtual machine apps like Docker and Multipass, you haven't actually said anything about "developing" per se. I assume you mean you are developing something on those Ubuntu VMs. As a developer in that specific context, I'm sure you are very knowledgeable. But don't assume that knowledge automatically translates to the Mac. From reading the Apple Developer forums, it is clear that most Mac developers know little about the Mac. But at least they know more about their development platform than most iOS developers do. 😄


You also mentioned Homebrew, which is something that end users install so they don't have to learn any of those technical details. For the record, I regularly see people posting questions about how some basic Unix command like "ls" or "cd" has suddenly stopped working and they're completely lost. In 100% of these cases, the cause is Homebrew. That's really a train wreck of an app. Although it is marketed towards end users, I wouldn't recommend it unless you really are a wizard on the command line. You'll need those skills the next time you update the OS and your Homebrew command line environment stops working.


If you are actually developing software on the Mac, then you most definitely shouldn't be using Homebrew. But if the Mac is just your VM host, then it should be fine. When you upgrade to Sequoia you should be able to get it fixed in a couple of hours.


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.

How do I optimise "System Data" storage space on my MacBook running macOS Sonoma?

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