When you decide to use FileVault to protect your personal stuff on a Mac (and you should), you are effectively using an encrypted disk image as storage for your home folder. Now, when you delete something in there, the space for it on the hard drive isn’t restored immediately. Instead, when you sign off later, OS X compacts and reclaims the space.
Many people use disk images not only implicitly with FileVault, but create them to protect content on other drives, such as USB disks or Flash memory sticks. The problem here is, disk space never seems to come back after you delete something on there, no matter what you do. This is because OS X designers really screwed up usability when it comes to actually working with disk images: cleanup doesn’t happen when you unmount the image, nor is there a menu option to reclaim lost space.
This means, you have to use the command line to compact disk images manually. Open a terminal window and type something like this, where “SomeUSBDrive” is the name of the disk or directory where your space-wasting image is located and “NameOfTheImage.sparsebundle” is, well, the image itself:
cd /Volumes/SomeUSBDrive hdiutil compact NameOfTheImage.sparsebundle
If the image is encrypted, you’ll be prompted to enter the password for it. Compacting images is really fast if you’re using sparse bundles, but if you’re not: this might take a while.
Possibly Related Posts:
- Mac Neophyte Tips: Clearing the local DNS directory
- Mac Neophyte Tips: Changing the default Java version
- Mac Neophyte Tips: FileVault on Removable Drives
- Windows XP Running on the Mac
More:
Mac Neophyte Tips: Clearing the local DNS directoryCan’t log on to your favorite website? Google.com went down?...
May I give a short burst of laugh here? Oh almighty, uber-userfriendly OS, why doth thou punish thy users with thy not-really-userfriendly console? Thou even look and behave like a Linux machine, and thou could never stand that, so I might imagine. So why don’t thou instantly die in shame? *scnr*
But hey, it could be worse. Think about nVidia. http://www.theinquirer.net/gb/inquirer/news/2008/09/01/why-nvidia-chips-defective
Hey, I’m not blind to the faults of OS X. Obviously there are many things that could be better, much better. And it’s not like I hate the console, I use it regularly for lots of stuff. But still, I don’t believe basic functionality such as this should be a console-only operation. It was a bad design decision, no question about it.
Overall, I strongly prefer OS X to Windows and Linux-based desktops. That doesn’t mean I think it’s perfect in any way…
@nVidia: oh noes, I didn’t follow this latest stuff. Between ATI’s shitty drivers and nVidia’s shitty hardware there’s nowhere to go, is there?
You know I *had* to write something like this. I cannot possibly imagine how anybody with brains could have decided to leave this functionality unknown to the GUI. I mean, it’s a no-brainer that users will want to free space every now and then…
About the chips: Well, you can stick with Intel’s graphics chips. Their drivers are somewhat reasonable (at least under Linux, they support the community pretty well; about OSX/Windows I don’t know), and the hardware is ok, though not very fast.
Or you just wait until nVidia’s shareholders just sued the hell out of the company until it’s forced to built well-designed hardware or just beeing bought by Intel.
I agree, it was a bad design decision to leave this out. These disk images were apparently designed to be the technological foundation for File Vault only. You see, File Vault home folders do this kind of compression automatically.
@Intel: they’re decent, I’ve got an Intel chip in my MacBook, it can even play WoW and Unreal Tournament. But it’s obviously not for serious graphicking
Bad design decision or not, users just can reboot and that will reclaim HD space. Most people are used to rebooting from Windows anyway. And most MacOS updates also need a reboot. (MacOS IS Windows!)
Just one question — does the hdiutil compact also work on my (mounted, in use) home directory? The hdiutil man page doesn’t say anything useful on that.
Uhh… no OS X is not Windows, at least not in any technically palpable sense. But hey, you’re right, a reboot once in a while is OK I guess.
It works with encrypted home folders as well. Only thing is: you have to be signed out (so the disk image gets unmounted) from your account for this to function.