MacOS – Clear large .MobileBackups files/folder

macostime-machine

Got some issues with temp files from Time Machine which is filling up my boot disk with over 400GB of files.

MacBook Pro 10.7.5

I have tried the command sudo tmutil disablelocal, restarting the mac and then the command sudo tmutil enablelocal but nothing happened.

Then after trying more than ones I have lost the folder ".MobileBackups" which I cannot see anymore from the finder through Go -> Go to Folder -> ".MobileBackups" and neither through terminal.

I have launched also the Disk and Permission repairs without success.

I have read also the thread here "How to wipe huge .MobileBackups folder?" but it does not mention really this case.

sudo du -smx /* /.* | sort -n | tail -4
26473   /Applications
164833  /Users
209589  /.
209589  /..

df -m /
Filesystem    1M-blocks    Used  Available  Capacity  Mounted on
/dev/disk0s2     476120  417400      58469       88%       /

Disk usage details:
Audio     13.60 GB
Movies    15.49 GB
Photos     3.03 GB
Apps       8.51 GB
Backups    Zero KB
Other    397.50 GB

Is my 400 GB still missing from .MobileBackups folder or do I need to look elsewhere?

PROBLEM SOLVED by advise from Klaus

From the Apple support link

I started up the Mac in "safe mode"… and surprising the disk appeared with 278 GB free space !!!!!!

Then I rebooted the Mac (no safe mode) and the disk kept the 278 GB free space, and now my disk appears like this:

Disk usage details:
Audio     13.60 GB
Movies    15.49 GB
Photos     3.03 GB
Apps       8.51 GB
Backups    Zero KB
Other    180.24 GB

Free     278.38 GB !!!!

Still unclear to me what "other 180.24 GB" are used for… though not big deal.

A this point I will reactive the local snap shots with "sudo tmutil enablelocal" and will keep working as usual!

THANKS AGAIN KLAUS…. VERY WELL DONE!!!!

TIP: when I was in "safe mode" I kept the Mac in that mode for a couple hours as I saw from Activity Monitor that Mac was accessing to the disk in writing mode… so I left it to do its work until I saw no more activities on disk access.

Best Answer

All signs point to you not having 400 GB (or even 26 GB of space used from .MobileBackups) and with the repeated edits, I'm not even sure we're on the same page, but for others - here are some things to try:

Rather than re-enabling things, try giving the system 5 minutes to clean up before the restart

sudo tmutil disablelocal 
sudo shutdown -r +5

Then when the machine restarts, look for that folder and delete things using Finder or terminal from /.MobileBackups once the machine is restarted with the local store disabled.

First check for a huge file in / with:

sudo ls -sa1 / | sort -n | tail -4

We know the large files aren't anywhere else but Applications and Users - but you could use this answer to search for smaller files (say 1 GB or larger)

If you're looking to just know what the size of various folders is - this long running command (14 minutes on an SSD MacBook Pro with 200 GB total allocation / 6 minutes on Mac Pro with about the same) will show you a list of the largest folders - hidden or not.

sudo du -smx /* /.* | sort -n

If that folder no longer shows using that space, your next recourse is to see if the filesystem catalog and free space accounting can be fixed. That would be the last step before backing up, erasing and reinstalling the OS.

Boot to single user mode: Hold Command + S when the boot chime is sounded and hold it until white text on a black screen appears.

/sbin/fsck -fy /

repeat the above check+repair until there are no errors and then

halt