Reducing macOS System Data Size
- Published on
Anyone who owns a Mac, I'm sure, has run into this problem. Especially as a developer, storage space can quickly become a limiting factor. Having never run into any issues on my old MacBook with 500GB of storage, I purchased my Mac Mini with the same 500GB.
Where'd It All Go!?
As anyone would, I took a look at the Storage page in System Settings. It became clear this wasn't just a matter of emptying the bin anymore. But what took me by surprise most was the fact "System Data" was using over 200GB of space.
System Data
System data, as I understand it, is what used to be referred to as "Other".
So it's really just a catch-all category for things like caches, snapshots, leftover app files, temporary files, and more.
Finding the Culprit
On Windows, I'd normally recommend WinDirStat. But on macOS, what am I to use?
Well, it turns out there's a few recommended options:
I went with the Disk Inventory X for no real reason other than it was the first one I found and it's free.
Running a scan against my system disk revealed .NET was being a huge storage hog. More specifically, as I do a lot of cross-platform development on my Mac, /usr/local/share/dotnet/ was using nearly 200GB of space alone.
Unused, old versions of workloads, runtimes, SDKs, NuGet packages, and other cache files were taking up huge amounts of space.
Regaining Some Space
For now I've manually removed ~50GB of old .NET workloads and NuGet packages from my system. This gives me a little more time until I can find some time to build/find a better process to automate this.
So watch this space, because I'm sure this will rear its ugly head again sometime soon.