Blog / Build log

The 186 GB that wasn’t, and the 41.6 GB that stayed

A frozen Mac, a wrong du reading, and five deleted copies of iOS that Xcode stopped listing but never removed.

At 2:38 in the afternoon on September 29, my MacBook Pro froze and then restarted on its own.

When it came back, the crash log pointed at low swap space, the room macOS uses on disk when memory runs short. The disk was 97% full.

By the end of that day, three tools had given me three wrong pictures of my storage. Storage settings put 212 GB under System Data and stopped there. du said iOS simulators took 186 GB, when the real number was about 64 GB. And simctl, Apple’s own tool, said six deleted simulators were gone, while five of them, 41.6 GB, never left the disk.

TLDRCheck with du -x, before and after

The crash log pointed at low swap space, on a disk that was 97% full. du blamed 186 GB of iOS simulators, but it had counted disk images mounted inside the folder, and the real number was about 64 GB. I deleted six runtimes with Apple’s own tool, and 41.6 GB of them stayed on disk where Xcode stopped listing it. A month later, 33.6 GB of that still sat on disk, on no list. That gap is what Diskling was made for.

The crash log pointed at the disk

The panic log didn’t say much in plain words. Two lines stood out:

panic(cpu 2 caller ...): watchdog timeout: no checkins from watchdogd in 92 seconds
... 13 swapfiles and LOW swap space

macOS writes swap files to the disk when memory runs short. Thirteen of them, plus a warning about low swap space, sent me straight to the disk. df showed the data volume 97% full: 460 GB, with 16 GB free.

Other things had been slow too. Obsidian took a moment to open notes, and I found out why. iCloud had moved 581 of my vault’s 583 notes to the cloud to save space on the Mac. Every note I opened had to download first.

System Settings wasn’t much help. Storage showed 212 GB of System Data, and System Data doesn’t break down any further. That’s 212 GB with no names on it.

Clearing the obvious things first

I started with what I knew about. Android Studio and its emulators went, then some local AI models, then an AI editor. All by hand, about 50 GB.

Then I went after what I didn’t know about, with an AI coding app running commands next to me. The list was long:

  • node_modules took 27.1 GB across 165 folders, and 69 of them hadn’t been touched in 90 days.
  • Docker images took 18.1 GB.
  • My AI coding agents, test runs and local test sites had left about 50 GB behind.

One number was bigger than all of those put together.

186 GB of simulators

$ du -sh /Library/Developer/CoreSimulator
186G	/Library/Developer/CoreSimulator

That was about 40% of the disk. simctl, the command-line tool that ships with Xcode, listed eight iOS simulator runtimes at 7.5 to 8.2 GB each. Only two had been used in the past month.

It looked like the easiest win of the day. I kept iOS 27.0, which matches Xcode 27, and iOS 26.5. The other six went with xcrun simctl runtime delete.

One of those deletes got stopped by a safety check in the AI coding app, so I ran it myself in Terminal. Afterwards simctl listed two runtimes, and Xcode’s Components settings agreed. By every tool’s count, the six were gone.

What du got wrong

Then I did the math, and it didn’t add up. Eight runtimes at about 8 GB each is about 64 GB, not 186.

du had walked into disk images. macOS had mounted runtime images inside /Library/Developer/CoreSimulator/Volumes, and a plain du -sh counts what’s inside a mounted image as if it were part of the folder. The -x flag keeps du on one file system:

$ du -shx /Library/Developer/CoreSimulator
3.0G	/Library/Developer/CoreSimulator

3 GB, all of it caches. My big number was wrong, and I’d made decisions with it.

The runtimes live somewhere else, in /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime, and they were about 64 GB. Still a lot for software I barely used, but nowhere near 40% of my disk.

The 41.6 GB that stayed

So I measured the folder where the runtimes really live:

$ du -shx /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime
 57G	/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime

I had kept two runtimes, and simctl said they came to 15.4 GB. The folder held 57 GB.

Five of the six runtimes I deleted were still there: iOS 18.0, 18.1, 18.2, 18.4 and 18.5, 41.6 GB together. Only iOS 26.1 had actually left the disk. Xcode didn’t list the other five anymore, and neither did simctl.

Each one’s Info.plist says NeverCollected, so macOS won’t clean them up on its own. simctl’s help says --keep-asset will “keep the associated mobile asset when deleting the runtime”. I didn’t pass it, so a delete without it should have removed the files. On my Mac it didn’t, for five out of six.

The folder is protected by System Integrity Protection, so sudo rm can’t remove it either. I’m not turning SIP off for disk space.

Free space went from 16 GB to 79 GB that day. Most of that came from the apps I removed by hand. The simulator cleanup freed far less than it looked like it did.

What I’d do differently: measure the folder where the files really live, with -x, before I delete anything and again after. The first number would have shown me 64 GB instead of 186. The second would have shown me the five that stayed, the same afternoon.

A month later

On October 28, I checked the simulators again. simctl listed two runtimes:

$ xcrun simctl runtime list
iOS 18.0 (22A3351) - CC3CC66B-9B75-4019-BC3D-50B90EEFAB51 (Ready)
iOS 27.0 (24A434) - 9AC2BBF1-6EAC-4F75-962C-50A29F64A30E (Ready)

Total Disk Images: 2 (15.3G)

iOS 18.0 was one of the six I deleted on September 29. It’s back on the list, and simctl says it was last run on October 24. All five leftovers had come back on simctl’s list by October 15, and I haven’t pinned down what put them there. Since then, the other four were deleted a second time. The AssetsV2 post follows that delete step by step.

Then I measured the folder:

$ du -sk /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime
51553840	/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime

That’s about 49 GB in six runtime folders. Each folder’s Info.plist names its iOS version: 27.0, 18.0, 18.1, 18.2, 18.4 and 18.5. iOS 26.5’s folder is gone.

Two of those six are the runtimes simctl lists, iOS 27.0 and iOS 18.0. The other four, iOS 18.1, 18.2, 18.4 and 18.5, are on disk and on no list, 33.6 GB by du. Deleting them twice didn’t free them. I still haven’t found a safe way to get that space back.

What I wanted instead

After that day I started asking around. Friends and colleagues had the same story: the disk suddenly almost full, and no idea where the space went.

The disk tools out there are good. DaisyDisk, DiskBuddy, Mole and Pearcleaner all do their job. DaisyDisk shows the map, but this space ends up under System Data or hidden space.

None of them explains who owns it, whether the owner’s own tool can remove it safely, or that a delete can leave the files behind. I had to work that out with du, and I got it wrong the first time.

That gap is what Diskling fills. It names the owner of every big folder, says whether it’s safe to remove, and removes it with the owner’s own command, shown to you first. After a cleanup it measures the disk again and tells you what didn’t come back, like these five runtimes.

Questions people ask

Why does du show the wrong size for a folder on Mac?

A plain du -sh follows mounted disk images inside the folder and counts their contents too. Add -x to keep it on one file system. On my Mac, that turned 186 GB into 3 GB for /Library/Developer/CoreSimulator.

Where do iOS simulator runtimes live on a Mac?

In /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime, not in Xcode’s folder or your home folder. Storage settings counts them as System Data.

Does deleting a simulator runtime free the space?

Not always. On my Mac, one of six deleted runtimes left the disk. The other five, 41.6 GB, stayed in AssetsV2 after Xcode and simctl stopped listing them. Run du -shx on that folder before and after a delete to see what really happened.

Next time you delete simulator runtimes, write down the AssetsV2 number first. I wrote up the full steps and that check. And if you find a safe way to get those leftovers back, tell me what worked.

Know someone with a full Mac? Send them this.
Nazmoon Munny
Nazmoon Munny Chief Overthinker at Dotbrain

I'm the product manager for Diskling, which mostly means asking "but what if" until nothing breaks. I studied soil science before software, and outside work it's family, farming and whatever I'm learning next.

Comments

No comments yet. Tried this on your Mac? Tell me how it went.

Please add your name.

That email doesn’t look right.

Add a few words first.

I read every comment before it shows up.