Stumbling across the Internet during the latter half of last week found me in search of ways to keep my new MacBook Air - with it's finite amount of storage - free of clutter. I came across an article by Kye Russell about OS X's MobileBackups.
MobileBackups are what all OS versions after 10.7 Lion use to store backups of your data when you're not attached to your Time Machine storage device. For those with a massive amount of hard drive space (think >500GB) and a road warrior mentality, this is most definitely a blessing. Not always being attached to your corporate network may find you in a precarious position for reliably backing up your data while you're VPNing for your daily connection. Even those with advanced home setups can find it a bit difficult at times. With MobileBackups, the data is written to a hidden directory - aptly named
.MobileBackups - on the boot partition. This way, you can also restore deleted (or edited) files without being attached to your Time Machine device.
The problem with this comes in two main forms:
- Those with desktop machines (iMac, Mac Pro, etc), don't really need this kind of hidden backup because they're most likely attached directly to a Time Machine device or backing up across a network.
- Those with a finite amount of storage (MacBook Air) or those anal about their storage footprint want to keep as much non-essential shit off their boot volume as possible.
Luckily, Russell points out a one-line cure all to be run from the Terminal to solve this arcane storage problem:
sudo tmutil disablelocal
Before I ran this simple fix, I first dove into my storage issue with a fine-toothed comb. I noticed that my storage went down from 120GB after OS installation to approximately 45GB available. I couldn't figure out where my storage was going. I wasn't downloading a shitton of torrents, Linux ISOs or any other massive files that would explain the sudden drop in available storage capacity. After reading a bit of the article, I decided to examine exactly how my storage was being utilized with DaisyDisk. (Side note: DD is an awesome utility for OS X and it's only $9.99 in the MAS. Do yourself a favor and get a copy. You'll thank me.) I was stunned to find that 75GB of valuable storage was being stolen by .MobileBackups! I frankly exclaimed, "What crap is this?!"
I quickly decided that to reclaim my on-board flash storage to be used how I decided, I would disable the Time Machine utility. It's important to point out that this has absolutely no effect on how Time Machine operates and you'll still be able to reconnect to your TM device when you're back on your network to resume your normal method of disaster recovery insurance. The only disadvantage is that you won't be able to restore from a backup without your physical copy of the data on your TM hard disk (or whatever media you're using).
If you're a stickler for ditching the crap that a default install of OS X can leave on your laptop's (or desktop's) storage, you'll definitely want to check this out.
After disabling MobileBackups, I now have 92.26GB of available storage on my hard drive. Sanity (and storage space) restored!
Update: You will need to re-run
sudo tmutil disablelocal when you upgrade between versions of OS X 10.10. I recently discovered through routine maintenance that .mobilebackups was created again. This was presumably done with the recent upgrade to 10.10.4 DP. If you find that your disk space is gone again, simply re-run the command.