Why do system information and du show drastically different numbers

I'm getting messages that I'm running out of disk space. "About this mac" > Storage shows this:

enter image description here

Note that it says I have 172 GB available, over a third of the disk.

Assuming the messages about running out of disk space were correct I did a df and indeed that shows that I only have 15 GB available:

$ df -kh /
Filesystem     Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1  466Gi  446Gi   15Gi    97% 1532132 9223372036853243675    0%   /

That's a huge difference. My trash is not the problem nor are local snapshots. Following https://apple.stackexchange.com/a/324443/233542, I deleted local snapshots and that only freed another 15 GB of data:

$ tmutil thinlocalsnapshots / 9999999999 1
$ df -kh /
Filesystem     Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1  466Gi  431Gi   30Gi    94% 1532163 9223372036853243644    0%   /

du doesn't help me either:

$ sudo du -hs * 2>/dev/null
Password:
 16G    Applications
 17G    Library
  0B    Network
 16G    System
4.0K    TMVersion.ini
243G    Users
487M    Volumes
2.5M    bin
  0B    cores
4.5K    dev
  0B    etc
1.0K    home
  0B    installer.failurerequests
1.0K    net
177M    opt
7.8G    private
1.0M    sbin
  0B    tmp
10.0G   usr
  0B    var

That only sums to about 310 GB. That comes a lot closer to the About this mac storage output shown above.

If du doesn't show what is using this data, what can I use to determine the consumer of an unaccounted 140GB (172GB "About this mac" - 30GB shown by df) of disk space?


Cause:

The "thin" command from tmutil thinlocalsnapshots [sometimes] does not delete all data content.


When this happens, after thinning the localsnapshots you may notice that not all free space were recovered [this is the OP problem he asked for solution]

The only working solution to recover space is to manually delete all localsnapshots.

After thinning you must verify if the thin command was successful by executing both commands below:

tmutil listlocalsnapshots / and tmutil listlocalsnapshotdates

If their return is EMPTY, then everything was deleted.

Otherwise if they return something, then the thinning process did not recovered all free space. (see image below for such situation where I repeatdly run the Thin command and the List command)

enter image description here

On the above image, everytime the command tmutil listlocalsnapshotdates is run, there is a list output. (so there are data residues left)

Snapshot dates for all disks:
2019-08-28-082639
2019-08-29-113651
2019-08-29-135729
2019-08-29-145723
2019-08-29-155709
2019-08-29-181243

Solution:

It is necessary to manually delete them all:

tmutil deletelocalsnapshots <snapshot>

One by one:

tmutil deletelocalsnapshots 2019-08-28-082639
tmutil deletelocalsnapshots 2019-08-29-113651
tmutil deletelocalsnapshots 2019-08-29-135729
tmutil deletelocalsnapshots 2019-08-29-145723
tmutil deletelocalsnapshots 2019-08-29-155709
tmutil deletelocalsnapshots 2019-08-29-181243

After doing, check again:

tmutil listlocalsnapshotdates
Snapshot dates for all disks:

There is no listing result as output. So now you have freed all possible space!

The OP got 152GB of free space by manually deleting all localsnapshots, which was not recovered by the thinning process.

This is very, very common on MacOS Catalina, I can assure it, and Apple is aware of it and changing things during the Beta phase. But it can also happen on Mojave and/or other versions.