does anyone know how to disable the default encryption of the swap file ?

i tried this by setting the default preferences

$ sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes

but this doesn't work :(

$ sysctl vm.swapusage
vm.swapusage: total = 1024.00M  used = 0.00M  free = 1024.00M  (encrypted)

any ideas ?


The option to disable the encryption was removed in recent versions of dynamic_pager.

| improve this answer | |

OS X Mavericks uses dynamic_pager to manage the swap file. The key name is UseEncryptedSwap not DisableEncryptedSwap.

So try

$ sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -boolean NO
| improve this answer | |
  • nop... swap file is still encrypted after boot. i guess there must be an new key or preset somewhere else – bertig Jun 19 '14 at 15:19

As you can see in dynamic_pager.c (source code of dynamic_pager) the key is called DisableEncryptedSwap and has to be located inside /Library/Preferences/com.apple.virtualMemory.plist.

I tried this with 10.9.5:

sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean YES

After reboot sysctl vm.swapusage shows no longer any encryption.

| improve this answer | |
  • Unfortunately today (still at 10.9.5 and with all Security patches applied) this tip doesn't work. After reboot, sysctl vm.swapusage still shows "(encrypted)" even after deleting /var/vm/swapfile prior to rebooting... Please can you confirm on your Mac and revert to us? – user123334 Apr 24 '15 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .