Private/var wasting lots of space

Discussion in 'macOS' started by Wirenut, Nov 6, 2016.

  1. Wirenut macrumors member

    Joined:
    Nov 6, 2016
    #1
    I have a MacBook Air with 128GB SSD. I was shocked to find that it is full. I found that QuickBooks backups were taking 40 gigs because I had it backing up everyday and the backups include attachments. These are not incremental backups, so they are just copies of the same thing. So that was easy to get rid of those files and open up 40 gigs of space.

    But what I found were 20+ gigs inside of the hidden private / var folder. I tried rebooting but that didn't help.

    What I found were QuickBooks backups inside of one of the folders inside of the var folder. I tried deleting them, but the Trash wouldn't empty because it said they were being used (QuickBooks wasn't even running).

    So am I stuck with that space being wasted?
     
  2. Fishrrman macrumors G4

    Joined:
    Feb 20, 2009
    #2
    Wirenut wrote:
    "What I found were QuickBooks backups inside of one of the folders inside of the var folder. I tried deleting them, but the Trash wouldn't empty because it said they were being used (QuickBooks wasn't even running)."

    Did you try rebooting?

    Try this:
    1. power down -- ALL THE WAY OFF
    2. reboot and hold down the shift key to initiate a "safe boot"
    3. when you get to the finder, try emptying the trash now.

    Any better?
     
  3. Wirenut thread starter macrumors member

    Joined:
    Nov 6, 2016
    #3
    I rebooted because I read something that said the private / var directory would be cleaned out when rebooting, but it didn't change a thing.

    Now I am worried about deleting those QuickBooks backup files because it said they are being used. I don't want to corrupt something. So that's why I figured I would ask here.
     
  4. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #4
    /var (or /private/var) is a Unix directory with multiple purposes and it is not cleaned out. Some sub-directories are cleaned out. /var/folders contains temporary files for applications and these are indeed cleaned out periodically, but not immediately upon rebooting (the system keeps files for 30 days). A safe boot does empty these directories immediately, but it comes at a performance cost as it evicts all system caches as well (which means that you should not do this without cause).

    /var is also the place where the system keeps memory swapfiles and the ‘sleep image’. Your system reserves a chunk of storage for the sleep image, which is about the size of your memory. It is used so that the device can hibernate and wake up quickly.

    20+ GB does seem a bit excessive, but it is not unusual. You can use this command to get a quick view of the storage usage in /var and post it here:
    Code:
    sudo du -Lhxd 1 /var
     
  5. Wirenut thread starter macrumors member

    Joined:
    Nov 6, 2016
    #5
    0B /var/agentx

    0B /var/at

    13M /var/audit

    0B /var/backups

    1.5G /var/db

    0B /var/empty

    16G /var/folders

    0B /var/folders~orig

    0B /var/jabberd

    4.0K /var/lib

    103M /var/log

    0B /var/mail

    4.0K /var/msgs

    0B /var/netboot

    1.7M /var/networkd

    7.9M /var/root

    0B /var/rpc

    465M /var/run

    0B /var/rwho

    2.6M /var/spool

    1.9M /var/tmp

    3.0G /var/vm

    0B /var/yp

    21G /var
    --- Post Merged, Nov 6, 2016 ---
    So there is 21 total gigs in var. 16 gigs is in Folders where the QuickBooks backups are.

    I have deleted the QuickBooks backups from there normal directory, so does that mean in 30 days or so they should also be gone from var/Folders?

    Thanks!
     
  6. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #6
    Yep, /var/folders will be cleaned up eventually. It is temporary storage. Some programs forget or omit to delete their temporary files, hence why stuff can pile up there.
     

Share This Page