After reading the case of the missing El Capitan hard disk space and following all the advice in that column, Jim Williams still had an inexplicable 300GB that had no reason to exist. He ran a disk analysis program that showed that a hidden Unix directory named
.MobileBackups.trash What is it and can he get rid of it?
This is a side effect of Time Machine, of all things. When one of your Time Machine targets is a drive that isn’t currently connected to your Mac, the backup system will continue to generate system snapshots up until all but 20 percent of drive storage is filled. After that point, Time Machine starts to delete snapshots and is more aggressive if you have very little storage available (less than 10 percent of drive capacity or less than 5GB).
As Apple documents, these temporary snapshots remain retrievable locally until such point as you reconnect to one or more Time Machine drives. Then the snapshots are copied to that backup drive or those drives and then deleted from local storage.
In Jim’s case, he has a drive that reports almost 680GB in capacity drive but only a bit over 70GB free. That brings us to the
.trash part of the directory. After the snapshots aren’t needed, they’re supposed to be deleted, and OS X accomplishes that by renaming the
.MobileBackups directory to
.MobileBackups.trash, and then progressively removing unneeded files and hard links—a special kind of Unix link that points to files on a disk without taking up additional storage.
OS X users have been reporting problems related to
.MobileBackups since 2011, as far as I can tell, and the only way you wind up noticing the issue is when something goes wrong. This apparently can happen if you or someone else renames the Time Machine drive that the OS X system expects to copy its local snapshots to; if that drive goes unavailable; or you switch to a new drive. The
.trash directory can apparently also get stalled and remain in place though it should be automatically deleted without additional effort. It just doesn’t always happen.
You should be able to see if local snapshots are a problem by selecting > About This Mac and clicking the Storage tab. You’ll see a colored bar labeled Backups (colored red) if there are local snapshots.
If these files persist, you can get rid of them from Terminal. Like with any Terminal operation, take exquisite care that you, first, have a full backup of everything and, second, follow instructions carefully. In this case, mistyping could delete many files and require a restore.
- Launch Applications > Terminal.
- Copy the following and paste it, ensuring a return at the end:
sudo rm -rf /.MobileBackups.trash
- Enter your administrative password for your OS X account when prompted.
If you’d like to pursue a method that’s less fraught, in step 2, copy instead:
sudo mv /.MobileBackups.trash ~/Desktop/MobileBackupsTrash
This will move the directory to your currently logged-in Desktop as
MobileBackupsTrash, and then you can drag the folder to the trash and empty the trash. You will likely be prompted again to enter an administrative user name and password.
Whichever method you choose, in a few minutes, all the storage should be freed up.
You can prevent Time Machine from making local snapshots at all by entering the following in Terminal; you’ll have to re-do this command with every OS X update (from 10.11.0 to 10.11.1, for instance):
sudo tmutil disablelocal
Ask Mac 911
We're always looking for problems to solve! Email yours to firstname.lastname@example.org including screen captures as appropriate. Mac 911 cannot reply to email with troubleshooting advice nor can we publish answers to every question.