Disk Space

Issue: before my eyes, hard disk space mysteriously would disappear. It was a long-standing problem that I'd clear space on my HD by removing apps or moving archives to an external hard disk, but the space would eventually dwindle. A more critical issue cropped up in late winter 2014: before my eyes, disk space would reduce to zero, slowing my MacBook Air to a crawl. It seemed tied to Safari somehow, as after running Safari for a while, disk space would go to zero then, if I exited, it would immediately recover that space. Nothing like the virtual memory I was used to Safari taking up. Over 5 GB would restore after Safari exited.

Things I tried:

  1. Adding all of my HD to Spotlight privacy

  2. Turned off Spotlight indexing altogether (not really an option, since I use and like Alfred).

    • Off: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

    • On: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

  3. Removed my Gmail account from Mail.app, since an Apple discussions board suggested it.

  4. Removed stray Parallels files using the uninstall script (and then rm -rf on any leftovers)

  5. Repaired the disk with Disk Utility while booted in recovery mode.

  6. Deleted everything in /System/Library/Caches after checking to see if someone else had done it before.

  7. Added two lines to system.sb. I don't remember where I found this, but the tips appear in several Stack Exchange answers. (The diff that follows is against a backup of the original.)

--- /Users/richard/system.sb 2014-03-13 08:50:10.000000000 -0700

+++ /System/Sandbox/Profiles/system.sb 2014-03-13 08:49:13.000000000 -0700

@@ -73,8 +73,6 @@

(global-name "com.apple.system.opendirectoryd.libinfo")

(global-name "com.apple.system.DirectoryService.libinfo_v1")

(global-name "com.apple.system.opendirectoryd.membership")

+ (local-name "com.apple.ls.boxd")

+ (global-name "com.apple.ls.boxd")

(global-name "com.apple.xpcd")

(global-name "com.apple.espd")

(local-name "com.apple.cfprefsd.agent"))

Deleting files from the Caches directory seems to have no (lasting) negative effects, though it did recover 27 GB (!) of space. Adding the above lines seems to have prevented disk space from reducing unnecessarily.