1

I'm not totally sure whether this is an Apple question or a Docker question, but I think it's mostly about Apple's file system reporting.

I've been using Docker various times over the past months/years, and meanwhile I've been noticing my local disk usage grow fuller & fuller. Here's a df of my laptop's drive:

% df -h
Filesystem                               Size   Used  Avail Capacity  iused     ifree %iused  Mounted on
/dev/disk1s5s1                          466Gi   22Gi   16Gi    57%   501138 172842000    0%   /
devfs                                   191Ki  191Ki    0Bi   100%      660         0  100%   /dev
/dev/disk1s4                            466Gi  4.0Gi   16Gi    20%        4 172842000    0%   /System/Volumes/VM
/dev/disk1s2                            466Gi  379Mi   16Gi     3%     2225 172842000    0%   /System/Volumes/Preboot
/dev/disk1s6                            466Gi  104Mi   16Gi     1%      466 172842000    0%   /System/Volumes/Update
/dev/disk1s1                            466Gi  422Gi   16Gi    97%  3162234 172842000    2%   /System/Volumes/Data
map auto_home                             0Bi    0Bi    0Bi   100%        0         0  100%   /System/Volumes/Data/home
//[email protected]:64318/Google%20Drive  100Gi   88Gi   12Gi    88% 22991589   3222809   88%   /Volumes/GoogleDrive
/dev/disk1s5                            466Gi   22Gi   16Gi    57%   502050 172842000    0%   /System/Volumes/Update/mnt1

So there's 16GB free. About 97% used.

Docker also reports a gazillion local volumes, so I do docker volume prune:

% docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Volumes:
9e00293745ae3fc4feea108396fcdd8256bfc046fa283d87c6737196dcf2779a
5ca5d7dc808a2cd561cd04d72f7b924fc9075f511cd82de859c50911a7cc4d59
...
d3c923cb6abf4a5967da6609d6e7ed863772db6b90063c41d2024e42cabdfa58
ee75c0801592c390d4197bd71274307fc230e8e420773481cb39aa9727b32953

Total reclaimed space: 35.27GB

Awesome, 35GB pruned. Except:

% df -h
Filesystem                               Size   Used  Avail Capacity  iused     ifree %iused  Mounted on
/dev/disk1s5s1                          466Gi   22Gi   16Gi    58%   501138 172331040    0%   /
devfs                                   191Ki  191Ki    0Bi   100%      660         0  100%   /dev
/dev/disk1s4                            466Gi  4.0Gi   16Gi    20%        4 172331040    0%   /System/Volumes/VM
/dev/disk1s2                            466Gi  379Mi   16Gi     3%     2225 172331040    0%   /System/Volumes/Preboot
/dev/disk1s6                            466Gi  104Mi   16Gi     1%      466 172331040    0%   /System/Volumes/Update
/dev/disk1s1                            466Gi  422Gi   16Gi    97%  3162288 172331040    2%   /System/Volumes/Data
map auto_home                             0Bi    0Bi    0Bi   100%        0         0  100%   /System/Volumes/Data/home
//[email protected]:64318/Google%20Drive  100Gi   88Gi   12Gi    88% 22991589   3222809   88%   /Volumes/GoogleDrive
/dev/disk1s5                            466Gi   22Gi   16Gi    58%   502050 172331040    0%   /System/Volumes/Update/mnt1

Nothing much has changed, still 97% full.

Is there some Funny Business going on here that I don't understand? Has Docker not really deleted its files, or is df not reporting correctly, or something else?

As another data point, I also used CleanMyMac to find a directory containing a Steam game (Superliminal) that was 11GB, I uninstalled that game, observed that the directory /Users/ken/Library/Application\ Support/Steam/steamapps/common/ is now empty, but still df reports no improvement in free disk space.

My drive formats are:

% mount
/dev/disk1s5s1 on / (apfs, sealed, local, read-only, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk1s4 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk1s2 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse)
/dev/disk1s6 on /System/Volumes/Update (apfs, local, journaled, nobrowse)
/dev/disk1s1 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
map auto_home on /System/Volumes/Data/home (autofs, automounted, nobrowse)
//[email protected]:64318/Google%20Drive on /Volumes/GoogleDrive (smbfs, nodev, nosuid, nobrowse, mounted by ken)
/dev/disk1s5 on /System/Volumes/Update/mnt1 (apfs, sealed, local, journaled, nobrowse)

And my OS version is:

% sw_vers
ProductName:    macOS
ProductVersion: 12.4
BuildVersion:   21F79
8
  • Have you tried to force a reindexing of your system? Commented Aug 1, 2022 at 7:40
  • @LarsNielsen I'm not sure what that means, could you point me to something? Commented Aug 1, 2022 at 15:10
  • Same here - but with Ubuntu.
    – Fabianus
    Commented Aug 1, 2022 at 23:05
  • 3
    Which macOS version are you using? Do you have Time Machine snapshots you need to delete? @LarsNielsen df doesn't use Spotlight, so reindexing won't do anything. Commented Aug 4, 2022 at 21:38
  • 1
    This is 100% on Apple file system and unrelated to spotlight. You’ll have the same issue deleting files with Finder and trash.
    – bmike
    Commented Sep 4, 2022 at 22:52

2 Answers 2

1

An update in the form of an answer - the solution might be "just wait a while". I've come back to my laptop after leaving it fallow under my bed for 4 days. Now here's the reported disk usage, at 85% capacity:

% df -h
Filesystem                               Size   Used  Avail Capacity  iused     ifree %iused  Mounted on
/dev/disk1s5s1                          466Gi   22Gi   67Gi    25%   501138 700431400    0%   /
devfs                                   191Ki  191Ki    0Bi   100%      660         0  100%   /dev
/dev/disk1s4                            466Gi  8.0Gi   67Gi    11%        8 700431400    0%   /System/Volumes/VM
/dev/disk1s2                            466Gi  379Mi   67Gi     1%     2225 700431400    0%   /System/Volumes/Preboot
/dev/disk1s6                            466Gi  104Mi   67Gi     1%      466 700431400    0%   /System/Volumes/Update
/dev/disk1s1                            466Gi  367Gi   67Gi    85%  3165798 700431400    0%   /System/Volumes/Data
map auto_home                             0Bi    0Bi    0Bi   100%        0         0  100%   /System/Volumes/Data/home
//[email protected]:64318/Google%20Drive  100Gi   88Gi   12Gi    88% 22991589   3222809   88%   /Volumes/GoogleDrive
/dev/disk1s5                            466Gi   22Gi   67Gi    25%   502050 700431400    0%   /System/Volumes/Update/mnt1

I'm still not sure what actual process has gone through & reclaimed space - whether it's a filesystem-level thing, or an application that's finally deleting its data, or maybe as @at0mic suggested some automatic Time Machine stuff that expired. I'll update this answer if things become clearer.

0

macOS uses snapshots to keep changes around in case you need to restore files. Disk utility can show you the space needed for each snapshot and delete them before the scheduled time when needed.

You did fine by waiting, but if you need to get the space sooner, you can manage that now you know this is intentional and the name of the app to show you snapshots.

Pay attention to the tidemarks and Private Size:

Private Size is the size of the data only referenced by that snapshot, and is broadly similar to the amount of space which would be recovered if that snapshot were to be deleted.

In your case the GB of data would be tied up in snapshots of disk1s1 and reviewable also from the command line:

diskutil apfs listSnapshots disk1s1

You must log in to answer this question.

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