3 ms·
There's a "securely erase free space" feature in Disk Utility, which does crash on me when I use it though, making a reboot necessary. Otherwise, you might simp
by Cockbrand 16y ago
There's a "securely erase free space" feature in Disk Utility, which does crash on me when I use it though, making a reboot necessary. Otherwise, you might simply use a one-liner like
dd if=/dev/zero of=/tmp/free_space_eater; rm /tmp/free_space_eater
This overwrites all unused space on the disk with zeroes.
You'll temporarily run out of free diskspace with either option, so it's a good idea to do this when you're not working on your computer.
- thibaut_barrere 16y agoThanks for both tips. I didn't even think it could be built in! Mac OS kind of amazes me on a regular basis.
- Cockbrand 16y agoLooking at it again, it's probably a good idea to extend that one-liner a little bit by throwing in a sync command, just to make sure that all zeroes get written to disk before deleting the fill-up file: dd if=/dev/zero of=/tmp/free_space_eater; sync; rm /tmp/free_space_eater