sleepimage/swap files..safe to delete?

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

  1. flyguy451 macrumors regular

    Joined:
    May 3, 2005
    #1
    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

    WildCowboy

    Staff Member

    Joined:
    Jan 20, 2005
    #2
    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 commands...it is a handy feature though.
     
  3. flyguy451 thread starter macrumors regular

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

    Thanks
     
  4. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    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

    Joined:
    May 3, 2005
    #5
    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

    joby866

    Joined:
    Jul 21, 2008
    Location:
    GREAT Britain
    #6
    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.

    E.G:

    .myfiles3805
     
  7. iShater macrumors 604

    iShater

    Joined:
    Aug 13, 2002
    Location:
    Chicagoland
    #7
    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

    ltldrummerboy

    Joined:
    Oct 15, 2007
    #8
    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