# How to check disk space on a Mac in Terminal

> The df command shows plain used and free space on a Mac, and du shows which folders are big. Commands tested on a real Mac, with what each flag does.

Canonical: https://www.notchstar.com/tips/check-disk-space-in-terminal-mac/
Last updated: 2026-11-04

Published 2026-11-04.

Open Terminal and run `df -h /System/Volumes/Data`. The Used and Avail columns show plain figures for the volume that holds your files. Unlike Finder, this number does not include space the system can reclaim by itself, so it is the stricter measure.

## Free space

```bash
df -h /System/Volumes/Data
```

`df` reports free disk space, `-h` prints readable sizes, and the path is the volume with your files. Note `Avail` before you start a cleanup and again after.

## Which folders use it

```bash
du -sh ~/* 2>/dev/null | sort -h
```

`du` reports usage, `-s` gives one total per item, `-h` makes sizes readable, `~/*` is every visible item in your home folder, `2>/dev/null` hides permission errors, and `sort -h` orders `900M` before `5G`. The last line is usually the Library folder. Go one level down:

```bash
du -sh ~/Library/* 2>/dev/null | sort -h | tail -8
```

## Single big files

```bash
mdfind -onlyin ~ 'kMDItemFSSize > 1000000000'
```

That lists every file over one gigabyte in your home folder.

## Reading the output

The first column of `df` names the volume, then come size, used and available figures, and a capacity percentage. Compare `Avail` with the size of what you plan to download or install. If you are under about ten percent free, plan a cleanup before the next big update, because macOS needs room to work. That ten percent is a rule of thumb, not an Apple figure.

## Safety

None of these commands delete anything. A command ending in `rm` deletes for good and skips the Trash, so when you remove something, drag it to the Trash in Finder instead. Do not type paths from memory after `sudo rm`.

## Why Terminal and the Storage screen differ

The graphical Storage screen in System Settings includes purgeable space and works in the background. Terminal gives the raw figure. Neither is wrong. For the graphical route, see [check disk space on a Mac](https://www.notchstar.com/tips/check-disk-space-on-mac/).

## Next steps

Use [find large files](https://www.notchstar.com/tips/find-large-files-on-mac/) for the full method and [what System Data is](https://www.notchstar.com/tips/what-is-system-data-on-mac/) if one category looks too large. The blog post [free up space on your Mac without a cleaner](https://www.notchstar.com/blog/free-up-space-on-your-mac-without-a-cleaner/) puts these commands in a 20 minute routine.

## No Terminal needed

NotchStar's [Disk tool](https://www.notchstar.com/features/disk/) shows free space for every drive and ranks folders by size with buttons instead of commands.

## Keep reading.

- [How to check disk space on a Mac](https://www.notchstar.com/tips/check-disk-space-on-mac/): See how much storage is used and free on a Mac in System Settings, in Finder, and with one Terminal command. Includes why the numbers can disagree.
- [How to find large files on a Mac](https://www.notchstar.com/tips/find-large-files-on-mac/): Find the biggest files and folders on a Mac with Storage settings, Finder size sorting and two Terminal commands. Tested commands, and what not to delete.
- [What is System Data on a Mac, and can you delete it?](https://www.notchstar.com/tips/what-is-system-data-on-mac/): System Data is the catch all in Mac Storage for files that fit no other category. What it holds, why it grows and what is safe to look at.
- [Disk space, duplicates, apps and cleanup](https://www.notchstar.com/features/disk/): See free space, find big folders, duplicates and app leftovers, compress media and clean caches from your Mac notch. Everything goes to the Trash.
- [How to find what is filling your Mac, and free space safely](https://www.notchstar.com/blog/free-up-space-on-your-mac-without-a-cleaner/): Find what fills your Mac with Finder and Terminal, learn which folders are safe to clear, and what to leave alone. Commands tested, with a 20 minute routine.

## More in Storage.

- [How to check disk space on a Mac](https://www.notchstar.com/tips/check-disk-space-on-mac/): See how much storage is used and free on a Mac in System Settings, in Finder, and with one Terminal command. Includes why the numbers can disagree.
- [What is System Data on a Mac, and can you delete it?](https://www.notchstar.com/tips/what-is-system-data-on-mac/): System Data is the catch all in Mac Storage for files that fit no other category. What it holds, why it grows and what is safe to look at.
- [How to find large files on a Mac](https://www.notchstar.com/tips/find-large-files-on-mac/): Find the biggest files and folders on a Mac with Storage settings, Finder size sorting and two Terminal commands. Tested commands, and what not to delete.
- [How to clear caches on a Mac safely](https://www.notchstar.com/tips/clear-caches-on-mac-safely/): Which cache folders on a Mac are safe to clear, how to check their size, and the rule that keeps you out of trouble: one app at a time, with the app quit.
- [How to find duplicate files on a Mac](https://www.notchstar.com/tips/find-duplicate-files-on-mac/): Two files with the same name may differ, and two with different names may match. How to find true duplicates on a Mac by comparing content.
- [How to empty the Trash on a Mac safely](https://www.notchstar.com/tips/empty-trash-on-mac-safely/): Empty the Trash from the Dock, restore items with Put Back, delete one item, handle locked files, and set the Mac to empty it after 30 days.
