Is it safe to delete Swap files and sleepimage?

/private/var/vm · Do not delete by hand

What it is

macOS swap files (memory moved to disk) and the sleepimage used for deep sleep.

Can you delete it?

No, not by hand. macOS manages and recreates them. Deleting them while in use can crash apps. A restart clears swap.

How to clean it safely

  1. Restart the Mac to clear swap.
  2. Quit memory-heavy apps.
  3. Run: sysctl vm.swapusage

How big is it on your Mac?

This read-only command prints its size and changes nothing:

 Terminal
du -sh "/private/var/vm" 2>/dev/null

Step-by-step guide: What is System Data →

Questions

Is it safe to delete /private/var/vm?

No, not by hand. macOS manages and recreates them. Deleting them while in use can crash apps. A restart clears swap.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac