I've been migrating an old MacBook Air (2012) to a new MacBook Pro, and am doing a clean at the same time.

I've been running df -h. to give me an idea of free space:

Filesystem     Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1  233Gi  207Gi   24Gi    90% 1717781 9223372036853058026    0%   /

To track down where the usage is, I've run du -sh:

bash-3.2$ sudo du -sh * | sort -h
  0B    Network
  0B    User Information
  0B    Volumes
  0B    cores
  0B    etc
  0B    tmp
  0B    var
1.0K    home
1.0K    net
4.0K    installer.failurerequests
4.5K    dev
1.2M    sbin
2.6M    bin
958M    usr
6.7G    Library
6.8G    private
8.0G    opt
8.9G    System
 26G    Applications
 58G    Users

Unless I'm bad at maths (please feel free to correct me), these are some way from adding up. (du indicates I've got about 120GB in use, df indicates about 207GB).

Any idea why the discrepancy? Any idea how to track the usage down?

I should note, I've been cleaning up on the command-line with rm -rf (as I deleted several accounts)

  • Possible duplicate of Large difference in reported free disk space – IconDaemon May 6 '18 at 22:09
  • 1
    du uses base-10 and df uses base-2 (look at the Gi size prefix from df. Instead, try df -H (use Kilobyte, Gigabyte prefixes) and see if that fixes the problem. – Allan May 6 '18 at 22:19
  • 1
    @IconDaemon - that link is about Finder and df. This is about du and df - not a dupe. – Allan May 6 '18 at 22:20

I suggest you boot into Safe Mode and let that process flush out some cache files that may have gotten very, very large. Right now, my ~/Library/Caches folder is > 5Gb in size.

This answer gives more info on where to find and eradicate large local Time Machine backup files.

  • 1
    While useful, this doesn't answer the issue with the discrepancy brought up by the OP. – Scot May 6 '18 at 22:44

Thanks for the suggestions,

First, the difference between base-10 and base-2 is about 7% for GB so the 50% difference is not that

I’ve also discovered that I was missing the “.” Files, in particular “.Trash” which is write only, even as root, so ‘du’ cannot see in, and therefore cannot calculate size.

After a bit of time, there has been about 100G freed up (not me actively doing anything) (according to df, du still reports the same) so I expect some cache was hiding in those files somewhere.

In summary, there appear to be files that du cannot access, and therefore there are discrepancies

You must log in to answer this question.

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