Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

2580285

Canceled
Original poster
Nov 2, 2016
61
38
Hi there,

I just setup a new MacBook Pro. Besides the usual folders like Library, System, Applications and Users I found vm which contains a 1.07 GB file named swapfile0. Would it be safe to delete this, in your opinion?

Thank you very much in advance!
 
Absolutely not! That file is used by the system to maintain virtual memory. So first off, you shouldn't delete it. Second, you probably can't. If you somehow manage to do so you'll probably crash the machine with a kernel panic. Then it would reboot just fine and recreate the file if it needs to.

See https://en.wikipedia.org/wiki/Virtual_memory
 
  • Like
Reactions: 2580285
That's what I thought, but shouldn't the swap files be located under /private/var/vm? Just curious about this.
 
Hi there,

I just setup a new MacBook Pro. Besides the usual folders like Library, System, Applications and Users I found vm which contains a 1.07 GB file named swapfile0. Would it be safe to delete this, in your opinion?

Thank you very much in advance!
I had that same folder/file appear out of nowhere. I backed up first then deleted the folder and rebooted and it never came back and caused no problems. I have no idea what caused it. I think it might have been the Mojave installer, but I'm not sure because I rarely look in that root folder.

As you mentioned, this is not the normal and hidden swap file location.
 
  • Like
Reactions: matisan
Thank you for your input, I'll then proceed to delete it.
Hi, excuse me, I would wonder whether there is any problem after that you deject that.
I have both macOS and windows system in my MacBook, and when I update the macOS system to macOS Catalina from Mojave , the swapfile0. come up.
I don't know how it work, and does it relate to the virtual space about windows system?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.