Open up the terminal,
found in applications->Utilities.
Type cd /var/vm
Type ls -al
You’ll see at least one swap file maybe more. The file sizes will grown and osx adds swap files as needed. I'm not sure of the heuristics when it decides not to grow a given swap file but instead create a new one.
Anyways to clear out the swap file - reboot. That is really the only and safest way. I've come across some solutions that purport to clear out the files, but the stability of osx is at stake. Just reboot.
Thank you. Did that and saw, I believe, two swap files. I asked because I was listening to a pod cast and someone said he had 5 swap files, he had not booted in ages; and he rebooted to clear them out. I thought he meant that you could establish swap files like in Linux. Clever that OS/X just makes them as you need them... thanks,Van
No problem,
there's plus and minuses in how apple implemented VM, with Linux you can specify a swap partition, with OSX you cannot. using a predefined partition reduces overhead as it does not need to manage the files and growth of those files. The simplicity of Apple's solution though fits in line with the ease of OSX.