Free the Inactive Memory Cache with `sudo purge`

Force macOS to discard cached file buffers after big file operations.

macOSpurgesystemmemoryMedium risk
Run `sudo purge` to purge the disk cache, then check Activity Monitor for the change.

01Command

Command
$ sudo purge

02What it does

macOS intentionally caches recently read files to speed later access, so “memory used” can look alarming while the cache is simply waiting to be reclaimed. `purge` asks the system to drop that buffer cache immediately. It is mostly useful for benchmarking or for memory-constrained servers running builds, not as an everyday booster.

03Risk

RiskMedium risk
!Warning: Flushing cache makes the next file reads slower until it rebuilds — purging regularly usually hurts performance rather than helping it. Requires sudo.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • purge(8) – force disk cache purge
    manpagez.com · technical · 2026-09-17
    Evidence: Manual page: purge attempts to purge disk buffer cache, per iOS/macOS memory pressure behavior

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions