Posted on 2 Comments

OS X swap files cleanup?

While at the MySQL Conf, I bought an Apple Time Capsule (1TB). I like it. It does appear that at least an initial time Machine backup eats significant swap space; not RAM as such, I have 4GB in my MacBook and it’s not used up at all…

Anyway, OS X cleans up the (encrypted) swap files in /private/var/vm on startup. However, I tend to not reboot my machine a lot, since just closing the lid has a near-100% survival rate (one of the reasons I use a Mac). So now I have these swap files hogging my diskspace. Right now I have 20 of about 1M. Of course, the same directory also holds the ‘sleepimage’ which with my amount of RAM is over 4GB in itself. Anyway, I’d rather not have OS X eat up 2GB of my disk until I decide to reboot – and I really don’t want to reboot!

So, anyone have an idea on how to get rid of old swap files without rebooting? I’ve found info online about completely disabling swap, but that is (even with 4GB RAM) probably not the best solution….

Posted on 2 Comments

2 thoughts on “OS X swap files cleanup?

  1. I’ve noticed this too, so if you find a way let me know. The other downside I’ve noticed with having so much RAM, is my sleepimage (suspend to disk) is 3G.

  2. Have you tried unmounting swap space and then remounting it? I’m not sure if that would clean up the swap space, but it might.

Comments are closed.