How to check disk space on a Mac in Terminal

df, du, diskutil and tmutil show exactly where your space went, including hidden folders Finder won’t show. Copy-paste commands with what each one tells you.

Short answer

Use df -h / for free space, du -sh ~/Library/* | sort -rh | head for the biggest Library folders, du -sh ~/.[!.]* | sort -rh | head for hidden folders, diskutil apfs list for how macOS splits the disk, and tmutil listlocalsnapshots / for Time Machine snapshots.

The steps
  1. df -h / to see free space.
  2. du -sh ~/* | sort -rh | head to find your biggest folders.
  3. du -sh ~/Library/* | sort -rh | head for hidden Library data.
  4. du -sh ~/.[!.]* | sort -rh | head for dot-folders.
  5. diskutil apfs list for macOS versus your data.
  6. tmutil listlocalsnapshots / for Time Machine snapshots.

Free space

df -h /

"Avail" is what's free right now, without purgeable space. Why that differs from Finder

Your biggest folders

du -sh ~/* 2>/dev/null | sort -rh | head -15

Hidden Library data (most of System Data)

du -sh ~/Library/* 2>/dev/null | sort -rh | head -15
du -sh ~/Library/Application\ Support/* 2>/dev/null | sort -rh | head -15

Without Full Disk Access for Terminal, some folders show "Operation not permitted". Grant it in System Settings › Privacy & Security › Full Disk Access.

Hidden dot-folders

du -sh ~/.[!.]* 2>/dev/null | sort -rh | head -15

What these folders are

Let TidyMac do this for you

Scan free, see every part of your storage explained, and clean only what’s safe. Everything goes to the Trash first.

macOS versus your data

diskutil apfs list

Look at "Capacity Consumed" for each volume: System, Preboot, Recovery and VM are macOS; Data is yours.

Time Machine local snapshots

tmutil listlocalsnapshots /

Paste your output, get an explanation

Run the Library command above and paste the result into our free System Data explainer. It runs in your browser and tells you what each folder is and whether it's safe to remove.

Keep reading