Compare Subfolder Sizes with du -d 1
One-line disk usage breakdown of every folder one level deep.
Run `du -h -d 1 <folder> | sort -hr` to list subfolders from largest to smallest.
01Command
Command
$ du -h -d 1 ~/Downloads | sort -hr02What it does
`-d 1` limits the report to one level, so you see each subfolder’s total without thousands of lines; `-h` prints human-readable sizes and piping to `sort -hr` ranks them. Drilling down level by level is the fastest way to find what actually fills a disk.
03Risk
!Warning: du counts the space files occupy on disk, not the logical sizes Finder shows for sparse or compressed files. On folders you cannot read, sizes print as 0 — run with sudo for complete totals.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- du – Display disk usage statisticsEvidence: Documents -d depth, -h human-readable output
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
List Local Time Machine Snapshots with tmutil
See every local APFS Time Machine snapshot on your startup disk and delete ones you no longer need.
Inspect Package Receipts and File Lists with pkgutil
List what an installer actually put on your disk, long after the installer window closed.
Remove AppleDouble ._ Files with dot_clean
The built-in tool for the hidden ._* files that litter non-HFS volumes and clog network shares.