Deleting Mac Mini 2012 'sleepimage' file?

Discussion in 'OS X Mountain Lion (10.8)' started by oneinten, Apr 11, 2013.

  1. oneinten macrumors member

    Mar 16, 2013

    Using omnisweep I attempted to reduce down my 50gb odd of 'Other' files before I clone it to a new SSD.

    In doing so I deleted the 'sleepimage' file using omnisweep which was 8GB, although I have 16gb RAM installed. After reading up I thought the sleepimage file should be the otal size of your installed RAM?

    I deleted the file, shut down my mac, restarted and then put it into sleep mode a few times,. and although the file hasn't come back, the folder insire the "VAR" folder hasn't either. It seems to go to sleep and walke up just fine.. but why hasn't my Mac Mini regenerated these files?
  2. Drew017 macrumors 65816


    May 29, 2011
    East coast, USA
    If its working okay don't worry about it for now. If the files still haven't come back over the next week or two you can always repair permissions, or if you need to, just reinstall OS X.
  3. oneinten thread starter macrumors member

    Mar 16, 2013
    Hello, how do I repair permissions?

    And if re-install os x. Will I need to format the drive or can I just repair the install? I'd rather not lose all my apps/media and have to make a backup.just yet
  4. Bear macrumors G3

    Jul 23, 2002
    Sol III - Terra
    The sleepimage file will only get created if Safe Sleep is turned on. In general Safe Sleep is more commonly used on MacBooks so the battery doesn't get slowly drained while sleeping.

    This can be turned on or off for any Mac. For your Mac mini Safe Sleep is most likely turned off so the sleepimage won't get recreated.

    In other words, you probably don't have an issue on your Mac.
  5. chrfr macrumors 604

    Jul 11, 2009
    No, on the 2012 Mini and iMac, hibernation/safe sleep is on, and the sleepimage file will always be created.
  6. Fishrrman macrumors G5


    Feb 20, 2009
    Launch terminal.

    Enter this:
    sudo pmset -a hibernatemode 0
    (disables safe sleep)
    Enter password when prompted.

    Next, enter this:
    sudo rm /private/var/vm/sleepimage
    (removes sleep image from disk)
    Enter password again, if prompted.

    Finally, enter this:
    pmset -g | grep hibernatemode
    (prints to screen the current hibernatemode setting)

    You should see:
    hibernatemode 0
    (Safe Sleep is disabled)

    Safe Sleep should now be turned off, and the sleep image has been removed from the drive.
  7. chrfr macrumors 604

    Jul 11, 2009
    Last time I tried that, the sleepimage file came back anyway. Maybe it does as it should with 10.8.3.
  8. benwiggy macrumors 68020

    Jun 15, 2012
    Repair Permissions does NOT recreate sleep images or any other sort of magic. Its usefulness is extremely narrow. It is not the universal panacea for all ills.

    But doesn't he want to get the image back? It's possibly worth mentioning what effect turning off Safe Sleep will have. If you run out of battery, you lose what you were doing.

    "Other" files are not necessarily a Bad Thing. It's pretty much everything except music, video and apps.
  9. GGJstudios macrumors Westmere


    May 16, 2008
    This may help: Freeing up drive space in Mac OS X

    If you're wondering what "Other" category in the Lion/ML storage tab is about, this may help explain:
    For space issues not explained by the above, there are a few things you can try, some of which may or may not apply:
    Here are a few resolutions found by others with the same question:

    How OS X and iOS report storage capacity
  10. maflynn Moderator


    Staff Member

    May 3, 2009
    Here's what you need to do to fix this:

    Set sleep mode in shell: sudo pmset -a hibernatemode 0
    Remove the image: sudo rm /private/var/vm/sleepimage
    Create a blanked file: sudo touch /private/var/vm/sleepimage
    Make file immutable: sudo chflags uchg /private/var/vm/sleepimage

  11. oneinten, Apr 11, 2013
    Last edited: Apr 11, 2013

    oneinten thread starter macrumors member

    Mar 16, 2013

    I purchased the Daisy Disk app and i have found my 8.5GB sleepimage file is back, but can anyone tell me why it is 8.5GB if I have 16gb of ram installed?

    I'll try and erase the file for good! but I'm thinking I might do a totally fresh install onto my SSD anyways and monitor the disk space regularly to see what it is that's hogging up the space!
  12. oneinten thread starter macrumors member

    Mar 16, 2013
    does anyone know if i Should have a 16gb sleepimage file?
  13. benwiggy, Apr 15, 2013
    Last edited: Apr 16, 2013

    benwiggy macrumors 68020

    Jun 15, 2012
    EDIT: As pointed out in your other thread on the same subject, a MacMini shouldn't have any sleep image at all. So you probably should follow some of the advice above about how to disable sleep images.

    Alternatively: the advice still stands: if there isn't an actual problem, then do nothing.

Share This Page