sleepimage/swap to delete?

Discussion in 'macOS' started by flyguy451, Jan 2, 2007.

  1. flyguy451 macrumors regular

    May 3, 2005
    I had some problems a few months ago with spontaneous shutdown of my Macbook. That was cured with a logic board replacement. My 60 Gig hard drive is filling up and so I have been using Whatsize to find and delete files and programs that I don't want or need any longer. In the course of doing this I have found some rather large swap files and a sleepimage file (see attached). I wonder if these are left over from the shutdown issues I had and if I could safely delete them. Advice?

    Attached Files:

  2. WildCowboy Administrator/Editor


    Staff Member

    Jan 20, 2005
    Sleepimage is a function of the new "Safe Sleep" function that sends all of your RAM data to that hard drive file every time you put your computer to sleep so that you don't lose everything if your computer loses all power. If you delete the sleepimage file, it will simply be recreated the next time you reboot your computer. I don't have a Safe Sleep-capable machine, but I understand that you can disable it using Terminal is a handy feature though.
  3. flyguy451 thread starter macrumors regular

    May 3, 2005
    OK, don't want to delete the sleepimage file if it's serving a useful purpose. What about swapfiles? Are they also being useful?

  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    The swap file is used by the OS when your computer runs out of physical RAM and then pages what is not currently active onto the hard drive to act as vertual memory. It probably is not a good idea to delete these files.
  5. flyguy451 thread starter macrumors regular

    May 3, 2005
    Normally I wouldn't even consider deleting them. I guess what I'm really asking is if it's possible that the multiple powerdowns left some of these files as orphans and, if so, how to know which ones are no longer viable and therefore safe to delete.
  6. joby866 macrumors member


    Jul 21, 2008
    GREAT Britain
    I don't know if this will be HELPFUL, but you could just add a dot before the file name. OS X Finder doesn't show any files starting with a dot.


  7. iShater macrumors 604


    Aug 13, 2002
    I'm not sure how this will help. You lost me. :confused:

    OP these files are better left alone, the system takes care of cleaning them up when you reboot, so I doubt you have "extras" left around.

    Maybe you should look to see what other large files are around that you can archive off to an external HD. I ended up moving my entire iTunes library to an external portable HD.
  8. ltldrummerboy macrumors 68000


    Oct 15, 2007
    If you're so desperate that you're deleting obscure system files, then you should just buy a new hard drive. You can get a 160GB for well under $100.

Share This Page