3

I've been tearing my hair out trying to figure out why my new machine (Mac mini M1 2020, Monterey 12.6) is supposedly running out of space. Running du/ncdu is showing only a total of 100 GB disk space used on /Users//System/Volumes/Data while "About this Mac" is showing 100GB free.

df -h output:

Filesystem       Size   Used  Avail Capacity iused     ifree %iused  Mounted on
/dev/disk3s1s1  228Gi   14Gi   16Gi    48%  502068 168288000    0%   /
devfs           201Ki  201Ki    0Bi   100%     694         0  100%   /dev
/dev/disk3s6    228Gi   24Ki   16Gi     1%       0 168288000    0%   /System/Volumes/VM
/dev/disk3s2    228Gi  407Mi   16Gi     3%    1120 168288000    0%   /System/Volumes/Preboot
/dev/disk3s4    228Gi  6.9Mi   16Gi     1%      41 168288000    0%   /System/Volumes/Update
/dev/disk1s2    500Mi  6.0Mi  482Mi     2%       1   4933840    0%   /System/Volumes/xarts
/dev/disk1s1    500Mi  7.2Mi  482Mi     2%      25   4933840    0%   /System/Volumes/iSCPreboot
/dev/disk1s3    500Mi  252Ki  482Mi     1%      36   4933840    0%   /System/Volumes/Hardware
/dev/disk3s5    228Gi  197Gi   16Gi    93% 5820788 168288000    3%   /System/Volumes/Data
map auto_home     0Bi    0Bi    0Bi   100%       0         0  100%   /System/Volumes/Data/home

du -sh /Users output:

 89G    /Users

diskutil apfs list output:

APFS Containers (3 found)
|
+-- Container disk3 EC457189-DB50-4DC3-889A-5C3D3463A588
    ====================================================
    APFS Container Reference:     disk3
    Size (Capacity Ceiling):      245107195904 B (245.1 GB)
    Capacity In Use By Volumes:   227875799040 B (227.9 GB) (93.0% used)
    Capacity Not Allocated:       17231396864 B (17.2 GB) (7.0% free)
[...]
    +-> Volume disk3s5 482393B0-579F-4948-A2AB-DE38985B1C8C
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk3s5 (Data)
    |   Name:                      Data (Case-insensitive)
    |   Mount Point:               /System/Volumes/Data
    |   Capacity Consumed:         211086553088 B (211.1 GB)
    |   Sealed:                    No
    |   FileVault:                 No (Encrypted at rest)

Disk Utility snapshot list shows nothing:

Disk Utility

I've confirmed that the space is actually limited by running dd if=/dev/zero of=zeros status=progress and confirming that it only takes a few GB to run out.

This new machine is a Jenkins build slave and, other than some utility installation and cloning of the (large) repository, has no extraneous files such as photos/videos.

What's taking so much space?

[EDIT] There's been some useful information from the questions asked that I think is relevant:

  • Disk Utility and df say that only 17 GB are free
  • "About this mac" says that 99.54 GB are available
  • 82.44 GB of space is marked as "Reclaimable" by Disk utility
  • Time Machine/snapshotting is not active
  • Rebooting does not reclaim the space, and diskutil secureErase freespace 0 /System/Volumes/Data/ spits out Error with secure disk erase: Secure erase by writing a run of bytes to an APFS Volume makes no sense due to its possibly-unbounded size (-69489)

Here is "About this mac" claiming that there's more space available:

about this mac

The question could be better-phrased at this point to be "How can I reclaim the space marked as purgable?

6
  • 2
    Disk Utility shows 82GB purgeable. Only you can find out what is using the remaining space. Run DaisyDisk or OmniDiskSweeper to see what is used by folders and files.
    – Gilby
    Commented Jan 10, 2023 at 21:10
  • Surely du/ncdu was enough of scanning? There was the expected usage of ~100 GB. There's nothing to suggest 200 GB of usage anywhere.
    – coreukills
    Commented Jan 10, 2023 at 21:35
  • I do not understand this question. Your output shows 17 GB of free space. Why do you expect there to be 100 GB of free space? Commented Jan 10, 2023 at 22:13
  • Only 100 GB of space is taken up. This is confirmed via "About this mac" →Storage which mentions 99.54 GB available. Considering Disk utility ismentioning that 82.44 GB is purgable this question might be better rephrased as "how can I reclaim this space?"
    – coreukills
    Commented Jan 10, 2023 at 23:59
  • "Surely du/ncdu was enough of scanning?". Clearly not or you wouldn't be asking the question. Use DaisyDisk or similar.
    – Gilby
    Commented Jan 11, 2023 at 3:13

2 Answers 2

2

I believe that the version of macOS I was on had a bug wherein it would refuse to free up space. I upgraded to 12.6.2 and I magically was gifted the expected 100GB back to me.

0

Giving your description of the situation (that it is a Jenkins build slave), and that your screen shots 82 GB of purgeable storage - it is likely that the space is taken up by local Time Machine snapshots.

I.e. in order for the system to be able to backup files to external storage that will be connected later - then files that have been deleted are actually still taking up disk space in the snapshots. When you backup to external storage, those snapshots will be removed automatically.

For a Jenkins build slave, you'll often have tonnes of files being created and instantly removed - and you would never miss those files or want them to be backed up. In that case, you could want to manually remove the snapshots.

To check if this is actually the case, open up the Terminal and run this command to list snapshots (if any):

tmutil listlocalsnapshots /

You can delete them afterwards using tmutil deletelocalsnapshots for a given date.

UPDATE

Since it was confirmed that snapshots are not the issue, I would recommend opening up System Settings > General > Storage and let it calculate the size of each category. Perhaps this overview can shed some light on where the space went.

You can press the "Optimise" button on this page to see if macOS can automatically purge unnecessary data (such as for example downloaded movies that have been watched).

For good measures, I would also check your Bin and ensure it is empty.

If the problem persists, I would try using a utility to determine what you're using the space for. A program such as OmniDiskSweeper or Disk Inventory X is very useful:

Make sure you are logged in as an Admin user while using these programs, and ensure you're scanning the entire disk.

If you have multiple user account created on the Mac, the storage could have been used up by another user.

8
  • Thanks for the answer! Sadly, this doesn't appear to be the case as tmutil listlocalsnapshots / returns empty
    – coreukills
    Commented Jan 10, 2023 at 21:26
  • Ah, no - I just realized that your screenshot already shows that you have no snapshots. So this is not the case for you. I'll leave the tip for others where it might be applicable.
    – jksoegaard
    Commented Jan 10, 2023 at 21:26
  • Are you using iCloud Drive?
    – jksoegaard
    Commented Jan 10, 2023 at 21:27
  • Also check About This Mac and Storage and then Details for more information about what kind of purgeable data, you have stored.
    – jksoegaard
    Commented Jan 10, 2023 at 21:30
  • No on iCloud Drive. "About this Mac" storage mentions 100 GB free, which is exactly what I would expect...
    – coreukills
    Commented Jan 10, 2023 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .