Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Recover free drive space when using FileVault System
Obviously hard drive capacity is limited, especially on laptops. Using FileVault, I find that every few weeks, I need to restart, as my free hard drive space has been depleted with the things that I have been doing, and obviously, this munches into the available hard drive space. Furthermore, when restarting, the FileVault box which says "Would you like to free up the space? Although this may take a while and cannot be stopped, it is reccommended you do this now" appears. This dialog only seems to appear at certain times, and not on every restart, but I may have found a way to trigger it so that any free space that is still being used by FileVault but which is actually empty can be freed up:
  1. Run Disk Utility
  2. Select the disk on which you want to free up the space
  3. Choose the Erase tab, and click Erase Empty Space, and then pick the Zero Out Deleted Files setting. This will try to create files (I think to back some stuff up?) which usually tends to munch up the rest of the available hard drive. When this is done, restart, and then the FileVault space-recovering dialog should come up.
The only downside that I can see is that it may not work for large drives (ie. the files created may not fill up the entire disk), or that it may take an age to free up the space.

[robg adds: I haven't tested this one.]
  • Currently 2.57 / 5
  You rated: 4 / 5 (7 votes cast)

Recover free drive space when using FileVault | 4 comments | Create New Account
Click here to return to the 'Recover free drive space when using FileVault' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recover free drive space when using FileVault
Authored by: andya on Mar 19, '07 09:12:22AM

you can also log into another account (i do it from the root account) and run this command:

hdiutil compact [path to your account's sparse image]

i've seen savings of upwards of 40% in my filevault home directory

[ Reply to This | # ]
Recover free drive space when using FileVault
Authored by: felix-fi on Mar 20, '07 05:36:10AM

Indeed hdiutil compact will do the same.

I use a sparseimage (on an SMB mounted volume) to make the backup of my home dir... and I am always surprised to see that deleted files space is not automatically recovered in sparseimage... one has to run hdiutil compact once in a while. Weird...

[ Reply to This | # ]
Recover free drive space when using FileVault
Authored by: markymarkuk on Mar 19, '07 04:10:04PM

The vilefault 'Recovery Disk Space" dialog only appears on logoff or restart if the laptop is plug into the mains electricity.

[ Reply to This | # ]
Recover free drive space when using FileVault
Authored by: wmertens on Mar 20, '07 09:17:06AM

So what's happening when you write all zeroes, is you're actually allocating space onto your filevault that was previously virtual.

You're way better off doing it in a terminal like the other replies say, it will be faster than what you propose and you get a progress bar (lots of '.'s to the end of line)

An important thing to consider though, is if you really want your movies, photos and audio encrypted. If not, move those folders out of your home directory (for instance to /Users/Shared) and make links to them (preferably symlinks).

Your filevault will then be in the 1-2GB range depending on your use, which is a lot better for performance and so on.

I once spoke to one of the apple developers about filevault and he said that Filevault wasn't designed to handle double-digit gigabyte images. It works, but not nicely.


[ Reply to This | # ]