Thrum

How do you check swap usage in Terminal on a Mac?

Last reviewed: 19 November 2026.

Run sysctl vm.swapusage in Terminal. It prints the total swap space, how much is used and how much is free, the same Swap Used figure Activity Monitor shows on its Memory tab. vm_stat adds the number of swap-ins and swap-outs since startup.

Which commands show swap usage?

  1. Open Terminal. Open Terminal from Applications > Utilities.
  2. Print current swap use. Run sysctl vm.swapusage. The output looks like vm.swapusage: total = 6144.00M used = 4969.06M free = 1174.94M (encrypted).
  3. See swap activity. Run vm_stat and read the last two lines, Swapins and Swapouts. They count pages moved in from and out to the swap files since the Mac started.
  4. Watch swap change live. Run vm_stat 5 to print a new line every 5 seconds. The first line is the total since startup; later lines show the change in each interval. Press Control-C to stop.

How do you read the vm.swapusage output?

FieldMeaning
totalThe size of all swap files macOS has created so far. It grows in steps as more swap is needed.
usedHow much of that space holds memory pages now. This is Activity Monitor's Swap Used.
freeSpace in existing swap files not in use.
(encrypted)The swap files are encrypted. System Information > Software lists this as Secure Virtual Memory: Enabled.

The swap files themselves are in /System/Volumes/VM/, named swapfile0, swapfile1 and so on. ls -lh /System/Volumes/VM/ lists them without an administrator password.

Is a large swap number a problem?

Not on its own. Swap Used can stay high for hours after a busy period, because pages stay on disk until something needs them. What slows a Mac down is swapping that is happening now.

Run vm_stat 5 while the Mac feels slow. If the Swapouts and Swapins columns keep growing in every line, memory is being moved to and from disk as you work. Pair that with yellow or red memory pressure and the fix is to quit memory-heavy apps. If the numbers stay at 0, swap is old and harmless.

Is there another one-line view?

top -l 1 -S -n 0 | grep -E 'Swap|VM'

-S adds a Swap: line (used plus free) to top's header, and the VM: line shows the swapins and swapouts totals, with the change since the previous sample in brackets.

How can Thrum help?

Thrum's Memory tab shows memory pressure, swap, and the eight processes using the most memory. An optional alert tells you when memory pressure turns critical.

Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.

Questions

Can I turn off swap on a Mac?

No. macOS creates and removes swap files itself, and there is no setting to turn swap off.

Does swap wear out an SSD?

Swap writes count toward the SSD's total writes like any other data. Heavy, constant swapping writes more, which is one more reason to keep memory pressure green.

Sources