Find Your Biggest Folders with du
du measures folder sizes; sorted through sort -rh and cut with head, it shows the top space consumers.
01Command
$ du -xsh ~/* 2>/dev/null | sort -rh | head -1502What it does
du -s gives one total per argument, -h renders sizes as GB and MB, and -x stops the walk at filesystem boundaries so network drives and backup volumes don't pollute the result. sort -rh sorts human-readable numbers descending, and head trims the list. Swap the target path to dig deeper — `du -xsh ~/Library/*` is the classic next step when hunting app leftovers. On large folders the scan takes a minute because every file must be counted.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- du — disk usage (macOS man page)Evidence: Documents du -s (summary per argument), -h (human sizes) and -x (stay on one filesystem).
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
See every local APFS Time Machine snapshot on your startup disk and delete ones you no longer need.
List what an installer actually put on your disk, long after the installer window closed.
The built-in tool for the hidden ._* files that litter non-HFS volumes and clog network shares.