Hacker News new | past | comments | ask | show | jobs | submit
The system data issue on macOS is awful.

I use my MacBook for a mix of dev work and music production and between docker, music libraries, update caches and the like it’s not weird for me to have to go for a fresh install once every year or two.

Once that gets filled up, it’s pretty much impossible to understand where the giant block of memory is.

Yep, it is an awful situation. I'm increasingly becoming frustrated with how Apple keeps disrespecting users.

I downloaded several MacOS installers, not for the MacBook I use, but intending to use them to create a partitioned USB installer (they were for macOS versions that I could clearly not even use for my current MacBook). Then, after creating the USB, since I was short of space, I deleted the installers, including from the trash.

Weirdly, I did not reclaim any space; I wondered why. After scratching my head for a while, I asked an LLM, which directed me to check the system snapshots. I had previously disabled time machine backup and snapshots, and yet I saw these huge system snapshots containing the files I had deleted, and kicker was, there was no way to delete them!

Again I scratched my head for a while for a solution other than wiping the MacBook and re-installing MacOS, and then I had the idea to just restart. Lo and behold, the snapshots were gone after restarting. I was relieved, but also pretty pissed off at Apple.

It's just as bas on Windows. Operating Systems and Applications have been using the user's hard drive as a trash dumping ground for decades. Temporary files, logs, caches, caches of caches, settings files, metadata files (desktop.ini, .fseventsd, .Trashes, .Spotlight-V100, .DS_Store). Developers just dump their shit all over your disk as if it belongs to them. I really think apps should have to ask permission before they can write to files, outside of direct user-initiated command.
I can't help but think back to a conversation with my girlfriend in 1984. She had just bought a PC and I had bought a Mac.

She said "Oh, you bought a toy computer. How cute!"

I've owned every architecture of Mac since then, and I still think of it is my toy computer.

Disk utility lets you delete them.
Nope, I tried that, was blocked by SIP.
Because Apple differentiates their products by their storage sizes, they also sell iCloud subscription. There is zero (in fact negative) incentive to respect your storage space.
Been a while since I needed to use it there but it always amazed me that the Windows implementation of iCloud was more flexible in terms of location and ability to decide what files got synced.
Ho ho, except for where it puts the photos. Those go into a subfolder of the system photos folder, and there's no configuration (yet you can configure the "shared photos" location)

And then, should you try to set up OneDrive (despite Microsoft's shenanigans, it does simplify taking care of non-tech-savvy relatives), it will refuse to sync the photos folder because 'it contains another cloud storage' and you'll genuinely wonder how or why anyone uses computers anymore

I had the same problem and had some luck cleaning things up by enabling "calculate all sizes" in Finder, which will show you the total directory size, and makes it a bit easier to look for where the big stuff is hiding. You'll also want to make sure to look through hidden directories like ~/Library; I found a bunch of Docker-related stuff in there which turned out to be where a lot of my disk space went.

You can enable "calculate all sizes" in Finder with Cmd+J. I think it only works in list view however.

I’d recommend GrandPerspective:[1] it’s really good at displaying this sort of thing, has been around for over two decades, and the developer has managed to keep it to <5MB which is perfect when you’re running very low on space.

[1] https://grandperspectiv.sourceforge.net/

I use GP, would recommend as well; it generates great color codes tree maps of your storage. Once you get used to navigating it that way, you won’t go back.
Something like https://dev.yorhel.nl/ncdu with ("brew install ncdu") is great if you are okay with the command line. It's very annoying to drill down in the Finder especially if it's hidden directories.
in a similar vein if you are looking for a nice GUI, daisydisk is great: https://daisydiskapp.com one time $10 payment
A ton of thanks. This "hack" allowed to finally see some stuff that was eating up a lot of my space and was showing up as "System Data". It turned out the Podman virtual machine on my MacBook had eaten up more 100GB!
Also DaisyDisk! Beautiful app. Perfect for discovering this kind of thing.
You can also just use du -hs, eg. to show the size of all subdirectories under ~/Library/Caches/ do:

  du -hs ~/Library/Caches/*
The trick is to reboot into recovery partition, disable SIP, then run OmniDiskSweeper as root (as in `sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper`). Then you can find all kinds of caches that are otherwise hidden by SIP.
Hmm, Full Disk Access perm is not enough?
It shouldn't be this hard to clear unwanted data from my own computer
My immediate reaction to this is that the OS has a hard time establishing intent, and in some cases it probably should be this hard to delete data that's required for the system to boot on the grounds that you'd probably want it if you understood what it was, and ideally also hard for malware to delete data it doesn't want on your computer (forensically useful logs, backup copies of files encrypted by ransomware, etc.).

But none of this applies to caches and temporary files, which could be reasonably managed for 99% of users by adding a "clear all caches" checkbox in the reboot dialog with a warning that doing this is likely to slow down the system and increase battery usage for the next few hours, or to system-managed snapshots that mostly just need better UI and documentation.

UI transparency is my only real complaint. A reasonable amount of data the system wants to make difficult to delete is fine, so long as it clearly explains what it is and why. "System Data" is only acceptable as a description for the root of what should be a well-documented hierarchy.

Seconding.

I should not have to hack through /Libary files to regain data on a TB drive because Osx wanted to put 200gbs of crap there in an opaque manner and not give the user ANY direct way to regain their space.

Even worse on ipad. My wife is an artist and 100gigs of "system data" is completely inscrutable and there's zero ways to fix it besides a full wipe.
I simply run GrandPerspective (GUI app, https://grandperspectiv.sourceforge.net/), or dust (terminal app, https://github.com/bootandy/dust), to give me an idea of what is going on with disk usage.
Thank you for this! I just downloaded it and identified over 50G of junk. It's just what I have been looking for to help manage my drive utilization.
Equally egregious are applications that insist on using the primary disk to cache model data/sample data/whatever
What should they do instead?

Like, assuming they need the data and it's inconveniently large to fit into RAM, where/how should they store and access it if not the primary disk?

They should ask. Let users specify a scratch / cache location - preferably fast storage that’s not The OS drive
My 256gb Mac Mini currently has 65gb of "System Data" and 40gb of "MacOS"
Gotta hit that docker system prune -a
> Once that gets filled up, it’s pretty much impossible to understand where the giant block of memory is.

Your friend is called ncdu and can be used as follows:

    sudo ncdu -x -e --exclude Volumes /System/Volumes/Data/
The exclude for Volumes is necessary because otherwise ncdu ends up in an infinite loop - "/Volumes/Macintosh\ HD/Volumes/" can be repeated ad nauseam and ncdu's -x flag doesn't catch that for whatever reason.