ClearDisk
Buy for $10Download ClearDiskDownload
A LITTLE MORE CLARITY

What sudo purge does on Mac and when to use it

Running sudo purge on a Mac flushes the non-essential disk buffer cache held in RAM to simulate a cold cache for performance testing, without clearing app memory or deleting any files on disk. For everyday slowdowns or high System Data, skip sudo purge and check Activity Monitor’s Memory Pressure graph or Storage settings instead.

What purge actually does

The installed macOS manual describes purge as a way to approximate a cold disk buffer cache for performance analysis. It explicitly excludes anonymous allocations made through interfaces such as malloc and vm_allocate. That is narrower than saying the command clears all RAM or affects nothing an app uses.

Cached file data helps avoid repeated storage reads. After a cache flush, later reads may have to fetch that data again. The amount reclaimed and how long any slowdown lasts depend on the workload; there is no reliable “a few minutes” rule or guaranteed rise in a particular memory counter.

man purge

Why it is not routine Mac maintenance

Apple describes Cached Files as file data kept in otherwise unused memory to improve performance. macOS can reuse that memory when it is needed. A large Cached Files value, by itself, is not evidence that the Mac needs cleaning.

purge is not a disk-cleaning command. It does not delete your Downloads, remove app caches from Library, or offer a supported way to remove swap files. A lower memory number after any intervention does not prove the app you care about became faster. Diagnose the symptom rather than scheduling cache flushes.

RAM cache, purgeable memory and purgeable disk space

These names describe different resources. Choose the check that matches the problem you are seeing.

  • Disk buffer cache: file data held in RAM. This is the cache targeted by the purge command for performance testing.
  • Purgeable memory: allocations an app marks as discardable under specific memory-management rules. This is not a count of removable files.
  • Purgeable disk space: storage macOS can reclaim when needed. Inspect Storage settings or Disk Utility for a disk-space problem; the purge command is not its cleanup control.

When a cold-cache test is relevant

A developer might use purge while comparing the same file-reading workload with a warm cache and a cold cache. The test must hold the workload constant and record elapsed time, rather than treating a changing RAM figure as the result. On a normal working Mac, background activity makes a clean comparison difficult.

This guide does not ask you to run sudo purge, schedule it, or install a RAM cleaner. We checked the installed manual on macOS 27.0.1 and used Apple’s Activity Monitor documentation; we did not run purge or measure a before-and-after speed improvement. A missing command or permission error is not a reason to disable security or install an unknown replacement.

Check the workload that feels slow

Open Applications → Utilities → Activity Monitor, select Memory, and reproduce the work that feels slow. Watch the Memory Pressure graph over time. Green means memory is being used efficiently at that moment; it does not rule out a slow disk, high CPU use, a network delay or an app-specific problem.

If pressure stays yellow or red while the slowdown occurs, sort by Memory and identify apps you recognize. Save your work, then quit an unneeded app through its own menu and compare responsiveness and pressure. Do not force-quit an unfamiliar system process just because it is near the top.

If an app repeatedly grows during ordinary use, record what triggers it and check the app’s support or updates. A restart can end that session’s processes and relieve symptoms, but an underlying problem can return when the workload resumes. Check startup-disk space too, because swap uses storage.

  • Pressure is green but the Mac is slow: inspect the relevant CPU, Disk or Network view and the affected app, rather than assuming RAM is the cause.
  • Pressure improves after quitting a known app: reduce that workload and see whether the improvement persists. A single sample is not a diagnosis.
  • Swap Used is nonzero: that alone is not a fault. Look at pressure, responsiveness and changes during the workload.
  • The warning says storage is full: follow a disk-space guide. Free RAM and free storage are different measurements.

Common questions

Does sudo purge clear RAM on Mac?

It flushes the disk buffer cache held in RAM. The macOS manual says it does not affect anonymous memory allocated through interfaces such as malloc or vm_allocate. It is not a general way to clear all app memory.

Should I run purge to speed up my Mac?

Usually no. It is intended for cold-cache performance testing, and later reads may need to fetch cached file data again. Check Activity Monitor’s Memory Pressure during the slowdown before deciding that memory is the problem.

Will purge remove System Data or purgeable disk space?

It is not a disk-cleaning command and should not be used to remove System Data, Library cache folders or swap files. Check Storage settings for disk use and Activity Monitor for RAM pressure.

Does green memory pressure mean nothing is wrong?

It means RAM is being used efficiently at that moment. CPU load, storage, the network or a particular app can still cause slowness. Watch the graph during the actual workload instead of relying on one idle reading.

References & further reading

These guides combine the linked official guidance with ClearDisk’s documented behavior. Your files and app settings determine the right next step.

Main guide: why is my Mac so slow and how low storage affects speed · Browse all Performance & memory guides →

FROM A NUMBER TO AN ANSWER

See what’s using
your space.

Explore your Mac with ClearDisk’s free local scanner.
Review the files. Keep the control.

Download free scannermacOS 15+ · version 2.2.1Cleanup license: $10 once