Macintosh HD/vm/swapfile0: safe to delete?

Discussion in 'Mac Basics and Help' started by ACD0236, Sep 30, 2018.

  1. ACD0236 macrumors member

    ACD0236

    Joined:
    Nov 2, 2016
    Location:
    Switzerland
    #1
    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!
     
  2. chabig macrumors 603

    Joined:
    Sep 6, 2002
    #2
    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
     
  3. ACD0236 thread starter macrumors member

    ACD0236

    Joined:
    Nov 2, 2016
    Location:
    Switzerland
    #3
    That's what I thought, but shouldn't the swap files be located under /private/var/vm? Just curious about this.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    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.
     
  5. ACD0236 thread starter macrumors member

    ACD0236

    Joined:
    Nov 2, 2016
    Location:
    Switzerland
    #5
    Thank you for your input, I'll then proceed to delete it.
     

Share This Page

4 September 30, 2018