bizlaw

Q: How to delete time machine local backup?

My MacBook Pro is running out of hard drive space, and the culprit is Time Machine. Apparently Time Machine stores local backups on the hard drive when it is not connected to the backup drive, and then is supposed to delete them when it does backup. However, this causes huge problems because I'm running out of hard drive space. I ran the following in Terminal to turn off the local backups:

 

sudo tmutil disablelocal

 

However, that has not freed up the hard drive space taken by the local backups. Any ideas on how to reclaim that space?

Posted on Mar 23, 2012 4:48 PM

Close

Q: How to delete time machine local backup?

  • All replies
  • Helpful answers

first Previous Page 4 of 6 last Next
  • by Pondini,

    Pondini Pondini Jun 26, 2013 5:51 PM in response to rosch
    Level 8 (38,747 points)
    Jun 26, 2013 5:51 PM in response to rosch

    rosch wrote:

    . . .

    One more thing - after the deletion of the local backups, turn off the creation of local backups using:

     

    sudo tmutil disablelocal

    In most cases, there's just no reason to do that.  They'll be deleted automatically to keep your HD under 80% full; if not, reduced to one per day after 24 hours, and deleted after a week.

     

    So they don't really take up any usable space.

     

    Think of them as (temporary) versions for the files that don't have regular versions.

     

    When you're away from your regular backups, they can be a lifesaver.

  • by rosch,

    rosch rosch Jun 27, 2013 12:22 AM in response to Pondini
    Level 1 (5 points)
    Jun 27, 2013 12:22 AM in response to Pondini

    Consider the following scenario, in which the built-in automatic procedures of the deletion of snapshots dont work:

     

    You have a very large file (e.g. a virtual machine container) which is smaller than the current "free" space on the SSD/HD (as shwon in finder) but bigger than the real free space.

     

    It is not possible to copy that large file to the SSD/HD unless the old snapshots are removed.

  • by Pondini,

    Pondini Pondini Jun 27, 2013 5:39 AM in response to rosch
    Level 8 (38,747 points)
    Jun 27, 2013 5:39 AM in response to rosch

    Yes, that's why my sentence started "In most cases." 

     

    The possibility of that fairly rare situation doesn't mean users should turn off a very useful feature unless it's really  necessary.


  • by rosch,

    rosch rosch Jun 27, 2013 10:44 AM in response to Pondini
    Level 1 (5 points)
    Jun 27, 2013 10:44 AM in response to Pondini

    Agreed! So, to make it clear, after turning local snapshots off and doing the necessary cleaning up, it is best practice to turn it back on:

     

    sudo tmutil enablelocal

  • by Ivan H,

    Ivan H Ivan H Jun 30, 2013 5:52 PM in response to rosch
    Level 1 (15 points)
    Mac OS X
    Jun 30, 2013 5:52 PM in response to rosch

    JUST TURN THE TIME MACHINE OFF AND BACK TO ON to release the Time Machine Local Backup Cache.

     

    Below is my test:

     

    On an MacBook Air 256 GB SSD, 4 GB memory, i7, OS X Mountain Lion ver 10.8.4, Time Machine ver 1.2, I found that the cache for Local Backup grows and will not shrink automatically in a 7 days testing period.

     

    The Time Machine is running on two alternate Wireless-N Wi-Fi network, each network has a Time Capsule Backup Disk, backing up With Account setting.

     

    During the test, the Local Backup increases from 6.1 GB to 54.7 GB though Time Machine backup to the TCs are done on a daily basis.  That's quite annoying because the Free Space drops from 80.4 GB to 31.7 GB in a week.

     

    All the way in 7 days, the Time Machine "Snapshots" occupy only 18.7 MB to 30 MB, as shown from About This Mac > Storage (Backups).

     

    I don't use "Sudo tmutil disablelocal" and "Sudo tmutil enablelocal" pair.

     

    Instead,

    I just go to System Preferences > Time Machine, and turn it to "OFF".

     

    - The Macintosh HD Free Space immediately returns 80.4 GB to me, as shown from the memory map from the Space Gremlin app. 

    - The Time Machine reserved buffer returns back to 6.1 GB, which is reasonable and acceptable. 

    - After running the Space Gremlin, I turn the Time Machine back to "ON".  That Time Machine reserved buffer doesn't grow immediately. 

    - I run the "Back Up Now" on both TCBDs, and the Time Machine Buffer doesn't grow up on day 7.

     

    So, I set up a reminder on that MBA, and at the most convenient time, it reminds me to turn the Time Machine OFF-ON once; and whenever the SSD Free Space is low, I do the same to reclaim 50 GB.

     

    b.t.w., turning TM to OFF and back to On again, doesn't slow down the TM Back Up Now, at least not obvious in my test environment.

  • by Pondini,

    Pondini Pondini Jun 30, 2013 5:50 PM in response to Ivan H
    Level 8 (38,747 points)
    Jun 30, 2013 5:50 PM in response to Ivan H

    Ivan H wrote:

    . . .

    I just go to System Preferences > Time Machine, and turn it to "OFF".

    Why?

     

    If the space is needed (ie, if your disk gets over 80% full), Local Snapshots will be deleted automatically.

     

    Only in exceptional cases is there a need to delete them. 

     

    If you delete them, and are away from your actual backups when something goes wrong (a file gets corrupted, or changed or deleted in error), you can't recover a prior version.

     

    Think of Local Snapshots as (temporary, expendable) Versions for all the files that don't have regular versions.

  • by Ivan H,

    Ivan H Ivan H Jun 30, 2013 5:57 PM in response to Pondini
    Level 1 (15 points)
    Mac OS X
    Jun 30, 2013 5:57 PM in response to Pondini

    Good question Pondini.

     

    I think local backup is a great feature and should be always used. 

     

    In my test, turning it OFF is only for temporary and for maintenance purpose because TM ver 1.2 does not do it automatically and I need the free space to run other things, e.g. Photoshop and iMovie etc.  Leaving me 30 GB is not enough to avoid the potential crash and slowing down performance. 

     

    99.99% TM are ON.

  • by Pondini,

    Pondini Pondini Jun 30, 2013 6:04 PM in response to Ivan H
    Level 8 (38,747 points)
    Jun 30, 2013 6:04 PM in response to Ivan H

    Ivan H wrote:

    . . .

    TM ver 1.2 does not do it automatically

    The Time Machine app doesn't do the automatic deletions;  it's the mtmfs (Mobile Time Machine File System)  process.

     

    Do you mean they're not deleted auomatically to keep your disk below 80% full (if there are lots of files involved, it can take a few moments)?

  • by Ivan H,

    Ivan H Ivan H Jun 30, 2013 6:19 PM in response to Pondini
    Level 1 (15 points)
    Mac OS X
    Jun 30, 2013 6:19 PM in response to Pondini

    Yes, that's part of the purpose of my test.  When the disk reaches over 90% full, nothing happens over the night while keeping the MBA on.  The "automatic deletion" seems not spontaneously happening on-demand.  A bug?

  • by Pondini,

    Pondini Pondini Jun 30, 2013 6:29 PM in response to Ivan H
    Level 8 (38,747 points)
    Jun 30, 2013 6:29 PM in response to Ivan H

    Yup.    Deletions should start at 80%, at a medium priority; if the disk gets to 90%, it should shift to a high priority.

     

    Does this survive a Restart?

     

    Is the mtmfs process runnning (per Activity Monitor)?

     

    Any error/failure messags in your logs from mtmfs? (per Console?)

  • by Ivan H,

    Ivan H Ivan H Jun 30, 2013 6:51 PM in response to Pondini
    Level 1 (15 points)
    Mac OS X
    Jun 30, 2013 6:51 PM in response to Pondini

    Restart does not trigger the automatic deletion in my test. 

    I have not checked the mtmfs process during the test.

    At this moment, mtmfs is running normally and CPU is 0.3%.

    Console shows a few "mtmfs: filesystem unmount attempted from stopFS", matching the times I walked through the process when I wrote this thread at earlier time today. No other mtmfs messages in earlier days, maybe I cleaned them up by other apps.

  • by Pondini,

    Pondini Pondini Jun 30, 2013 7:02 PM in response to Ivan H
    Level 8 (38,747 points)
    Jun 30, 2013 7:02 PM in response to Ivan H

    We're  missing something here.

     

    From your earlier post:

     

    During the test, the Local Backup increases from 6.1 GB to 54.7 GB though Time Machine backup to the TCs are done on a daily basis.

    You're only backing-up once a day?  How are you doing that?  If Time Machine is OFF, and you're using Back Up Now from the menubar, you shouldn't have any Local Snapshots at all. 

     

    Local Snapshots are made whenever Time Machine is ON; whether the backup destination is available or not.

     

    Where are you seeing the 6.1 and 54.7 GB figures?


    That's quite annoying because the Free Space drops from 80.4 GB to 31.7 GB in a week.

    That's shown where, on the Storage display?  Or the Finder? 

     

    All the way in 7 days, the Time Machine "Snapshots" occupy only 18.7 MB to 30 MB, as shown from About This Mac > Storage (Backups).

    Do you really mean MBs, not GBs?  If so, Local Backups aren't the problem; something else is.

  • by Ivan H,

    Ivan H Ivan H Jun 30, 2013 8:04 PM in response to Pondini
    Level 1 (15 points)
    Mac OS X
    Jun 30, 2013 8:04 PM in response to Pondini

    Wow, a lot of Qs.

     

    From your earlier post:

     

     

    During the test, the Local Backup increases from 6.1 GB to 54.7 GB though Time Machine backup to the TCs are done on a daily basis.

     

    1. You're only backing-up once a day?  How are you doing that?  If Time Machine is OFF, and you're using Back Up Now from the menubar, you shouldn't have any Local Snapshots at all.

     

    Correction.  Not "Daily Basis" but "Continuously whenever the Wi-Fi is connected or re-connected".  I move between two Wi-Fi networks and thus the backup to disk A on Network I and to disk B on Network II are alternatively disrupted.

         But if I want, I can use TimeMachineScheduler app to set up a regular backup time.  That'll turn TM OFF-On-OFF, but I wonder that'll turn off local backup as well.


     

    Local Snapshots are made whenever Time Machine is ON; whether the backup destination is available or not.

     

    Agree.

     

    Where are you seeing the 6.1 and 54.7 GB figures?

     

    From the Space Gremlin app's generated map.

     

    That's quite annoying because the Free Space drops from 80.4 GB to 31.7 GB in a week.

     

    That's shown where, on the Storage display?  Or the Finder?

     

     

    The main reference is from the Activity Monitor > Disk Used, but similar figures from the About my Mac > Storage display.

     

    All the way in 7 days, the Time Machine "Snapshots" occupy only 18.7 MB to 30 MB, as shown from About This Mac > Storage (Backups).

    Do you really mean MBs, not GBs?  If so, Local Backups aren't the problem; something else is.

     

    Yes, MBs, not GBs.  That's why I am guessing a bug of the Time Machine app ver 1.2.

  • by Pondini,

    Pondini Pondini Jul 1, 2013 6:51 AM in response to Ivan H
    Level 8 (38,747 points)
    Jul 1, 2013 6:51 AM in response to Ivan H

    Ivan H wrote

    . . .

    But if I want, I can use TimeMachineScheduler app to set up a regular backup time.  That'll turn TM OFF-On-OFF, but I wonder that'll turn off local backup as well.

    Yup.  See the pink and yellow boxes in Time Machine - Frequently Asked Question #13.

     

     

    Where are you seeing the 6.1 and 54.7 GB figures?

     

    From the Space Gremlin app's generated map.


    Sorry, I don't know what that is or what it's showing.   The size of your Local Snapshots is shown on the Storage display.

     

     

    That's quite annoying because the Free Space drops from 80.4 GB to 31.7 GB in a week.

     

    That's shown where, on the Storage display?  Or the Finder?

     

     

    The main reference is from the Activity Monitor > Disk Used, but similar figures from the About my Mac > Storage display.

     

    All the way in 7 days, the Time Machine "Snapshots" occupy only 18.7 MB to 30 MB, as shown from About This Mac > Storage (Backups).

    Do you really mean MBs, not GBs?  If so, Local Backups aren't the problem; something else is.

     

    Yes, MBs, not GBs.  That's why I am guessing a bug of the Time Machine app ver 1.2.

    Something doesn't agree.  The Finder (and Get Info) don't count Local Snapshots as "used" (since they're expendable);  Disk Utility does.  The difference between those two should equal the size of your Local Snapshots as shown on the Storage display.

     

    If the Storage display only shows MBs for Backups, then Local Snapshots aren't taking up GBs, and aren't the problem.

     

    It sounds a bit like you may have an app with a memory leak, causing a lot of disk to be used for swap files, or something else taking a lot of space.

     

    See Where did my Disk Space go? for the usual suspects, and ways to find out what's really using the space.

  • by Ivan H,

    Ivan H Ivan H Jul 1, 2013 7:44 AM in response to Pondini
    Level 1 (15 points)
    Mac OS X
    Jul 1, 2013 7:44 AM in response to Pondini

    It's not memory leak nor something else.  It's Time Machine.  The pictures explain:

     

    Before the Time Machine set to OFF:

     

    Before.png

    After the Time Machine set to OFF:

     

    After.png

    The free space remains after TM set back to ON. 

first Previous Page 4 of 6 last Next