Automatically erase free space

Hi,
I know how to use the disk utility to erase the free space on my drive.  I was wondering if there was a way to have OSX perform the erase free space operation automatically once a month or once a week.  Thanks for your help.

Run as a launcd (set to run once a week or month):
If you need info on launchd, in Terminal, man launchd, man launchd.plist
For a GUI launcd editor, see Lingon 3
To run secure erase from Terminal, See: Securely erase free space from Terminal 
("Or you’re really paranoid, and would like to schedule a task (using cron or launchd) that regularly erases the free space on your drive.")
("Warning! It’s critically important that you include the freespace portion of that command. If you don’t, diskutil will happily start securely erasing the entire disk, instead of just the free space! Yes, that’s a Really Bad Thing, especially because it will be securely erased, meaning there’s no chance you’ll be able to recover the data. “With great power comes great responsibility.”)

Similar Messages

  • Unusual hard disk activity after "Erase free space"

    I have two partitions on my hard disk - a small partition for the system software and a big partition for everything else. A few days ago, I backed up a few files from my big partition and then used Disk Utility "Erase free space". Since then, my hard disk is behaving oddly. I can hear it, as if it continuously reading and writting data. At first, I thought it was an auto-update in progress or some sort of automatic system maintenance. But the odd behavior never stopped. I scanned my files with an anti-virus software - nothing wrong. I scanned my files with Disk Utility - nothing wrong. I used Onyx to check the system - nothing wrong. I even erased and reinstalled the system software - no changes! So what could possibly force my hard disk to behave like that? Is something messed up because of "Erase free space"?

    You could run fs_usage
    To view file activity for all processes with the fs_usage tool, you would enter the following at the Terminal prompt.
    sudo fs_usage
    If you wanted to limit the display to files accessed by a particular process, you could redirect the output through the grep tool. For example, to display file behavior for the TextEdit application, you would enter the following at the Terminal prompt:
    % sudo fs_usage | grep TextEdit
    Once your application finishes launching, stop fs_usage by typing Control-C in your Terminal window.
    Look for all writes. Might be mdworker (Spotlight)
    Try reindexing Spotlight by dragging the HD icon into the Privacy window. Leave it there for a minute and remove it using the minus button.

  • Kernel panic after "Erase Free Space" No end in sight

    I did an "Erase Free Space" in disc utility. After seeing it through to about 90% complete, I went to bed. When I got up in the morning my fan was whirring away and I couldn't wake up the computer, so, using the power button, I shut it down, then turned it back on. Now I can't get into OS X (I see the message "You need to restart your computer..."), I can't boot from CD, and I can't boot in safe mode. All I can do is run the hardware test (after booting while holding "option" key), which tells me everything is fine. My only theory is that my hard disc was locked during the erase free space operation and since I have been unable to properly reboot the system, it can't be unlocked in order to boot from CD or open OX X. Any thoughts? I've been without my mac for a week now and am growing increasingly desperate. Thanks.
    iMac G5 (with iSight) Power PC 2.1 GHz   Mac OS X (10.4.8)  

    ..."When I erased free space, instead of writing zeros to the free space, it essentiall wrote ones [...] I can start up in single-user mode and am contemplating formatting the drive and reinstalling OS X, if I can't just erase induvidual files."...
    How exactly did you figure this out - what exactly are you seeing with respect to "individual files"? I thought the procedure with erasing free space used by OS X was basically to fill the free space with a big file, and securely deleting that file, but things may have changed. Your reference to writing ones and individual files is giving me an impression of many small files instead of a single large one - i.e. something that is different from what I would have expected.
    I would have suggested looking for a file called EFTFile1.sparseimage or EFTfile2, or something like that while booted in single-user mode. It would have been in your user's "~/Library/Caches/TemporaryItems" folder, or in "/private/var/root/Library/Caches/TemporaryItems" and been as large as the free space was before starting the procedure. It should have been deleted automatically if the process had succeeded but if the process was interrupted, it would have been left on the drive taking up all of the space. Normally, you should be able to 'rm' it manually after mounting the drive as writable (with the usual warnings about executing commands in single-user mode), but since the situation may be different in this case, I don't know if this suggestion applies...

  • Erase Free Space vs Reformat Hard Drive

    I am getting ready to sell my computer. In the past I have had troubles when I reformatted my hard and then reinstalled the OS. If I use "Erase Free Space" from the Disk Utility and choose 7 pass overwrite should I be confident that all deleted personal information will be securely removed?
    Thanks
    12" PowerBook G4   Mac OS X (10.4.8)   768 MB RAM, Superdrive

    It would be simpler, not to mention much, much faster, to do an Erase and Install of OS X. If you've had problems with the hard drive in the past, then I suggest doing the following before installing:
    Extended Hard Drive Preparation
    1. Boot from your OS X Installer Disk. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.)
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. Otherwise, click on the Partition tab in the DU main window.
    3. Set the number of partitions from the dropdown menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Partition button and wait until the volume(s) mount on the Desktop.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled, if supported.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process will take 30 minutes to an hour or more depending upon the drive size.
    After formatting has completed quit DU and return to the installer. Now proceed with the OS X installation. When the installation has completed DO NOT RESTART. Instead simply shut down the computer. When the new owner starts up the computer it will automatically start up in the Setup Assistant as if new out of the box.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Disk Utility erase free space problem

    I tried to clean my hard drive by overwriting the free space using Disk Utility to make deleted files unrecoverable. But I got the message: "Your startup disk is almost full. Make room by deleting files." But my hard disk is 250GB (Capacity 232.6 GB) of which 197.4 GB is available and 35.2 GB used. I also have a 40 GB Iomega external hard drive which I use for automatic daily backup (using Chronosync). If I try to overwrite the free space on that drive with zeros, I get the message "Secure Erase Free Space failed -- Could not create temp file." There is 17.5 GB available. The Volume format is "Mac OS Extended (journaled)."

    This may help:
    http://docs.info.apple.com/article.html?path=DiskUtility/10.5/en/duh1010.html

  • I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly apprec

    I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly appreciated. how can find the hidden temporary files using the terminal what do i type in?

    It's more likely a failed Erase Free Space, which creates a huge temporary file; that's why it looks like you have no more available drive space. You can recover from this. See these links
    https://discussions.apple.com/message/10938738#10938738
    http://www.macgeekery.com/tips/quickie/recovering_from_a_failed_secure_erase_fre e_space 
    Post back if you need any help with this.

  • 'erase free space' not secure - it doesn't seem to work?

    Just wanted to point out that the erase free space option in Mountain Lion does not seem to work, at all.
    A week ago I ran erase free space on my primary data drive then later, out of curiosity, I ran an inexpensive third party recovery program on the disk just to see what happened. Interestingly enough the recovery software was able to find and restore files that I had deleted over a year ago.
    This has me thinking, so today I tried it again, only with a 7 pass erase this time. Nope, same thing. After a 7 pass erase (erase free space) this low end, less than $35 recovery software turns up tons of files, everything from stuff I just deleted a few days ago to stuff from over a year ago.
    If I'm doing something wrong I would love for someone to point it out to me. Not that I'm toting state secrets or anything on my mac, but still - my privacy is important to me and I assume it is to others.
    I'd encourage folks to try this out for themselves.
    My set up is a 2011 macbook pro with an SSD as the boot drive, I've got a second harddrive installed in the optical bay and this is where my home folder lives. The secondary drive is the drive where I'm running erase free space.
    The only thing that I can think of is that, even though the button is not greyed out, maybe I need to be booted to recovery in order to succesfully run erase free space on system drives?
    Any input would be greatly appreciated, otherwise this seems like a pretty ugly security lapse on the part of Apple. Imagine if you're selling your machine and secure erasing before turnign it over to its new owner - and the new owner can run a $35 dollar recovery program and access everything on your machine.
    Not good. 

    Thanks for your response, William.
    I think that the issue may have to do with being booted to the system while trying to erase free space. I ran a 7 pass erase free space on a 1TB external Lacie drive this afternoon, the operation took a bit over 6 hours to complete and recovery sofatware is turning up nothing.
    This is in contrast to the main drive, which my original post referenced, which is a 500gb 7200 rpm internal drive. A 7 pass secure erase took less than 5 minutes to complete - so, even though the drive is 1/2 the size, there's obviously something not right with the 7 minutes time to complete.
    Tomorrow I'm going to try either booting to another account (which doesn't utilize this partcular disk) or booting to recovery and seeing what happens.
    I have a feeling that this will solve the problem - I'll post back tomorrow evening. 

  • In restoring my mac mini to factory specs-what is considered "free space" as in the question of erasing free space.

    When you go to do a factory restore what is erasing "free space?
    Plus, I have no Command keys on my keyboard-how to do Command R without a Command Key?
    Carol

    CarolF5 wrote:
    When you go to do a factory restore what is erasing "free space?
    Don't bother with that option, unless you are going to sell your computer and want to be sure that your data can't be recovered.
    To be more specific it securely erases the unoccupied space of your hard drive, leaving the rest of your data intact.
    I have no Command keys on my keyboard-how to do Command R without a Command Key?
    You mean you have a PC keyboard? If that is the case the Command key translates to the key with the Windows flag.
    The Alt key is the Option key on an Apple keyboard.

  • My external hard drive accidentally switched off during Disk Utility's "erase free space" process.  I restarted the external hard drive and Disk Utility, but now I get the "couldn't mount disk" error when trying to finish the erase.  Please help!

    My external Lacie Quadra hard drive accidentally switched off in the middle of "erase free space", and when I switched it back on Disk Utility was hanging.  So I Force Quit Disk Utility and restarted it.  Now when I try to erase I get
    "Secure Disk Erase failed with the error: Couldn’t unmount disk."
    But "erase free space" seems to work...
    What can I do?  I'm erasing as I'm giving the drive to someone else and I wanted to wipe it clean.
    Also should I use "erase" or "erase free space" if I want to wipe the drive clean?
    Please help!

    Sorry I don't really understand.... there are no partitions on the drive.  How do I repartition it?
    And should I use "erasing free space" or "erase" for wiping clean my drive of everything?  Erase seems to be faster last tiem I tried.
    Thanks!

  • Time Capsule full after a "Erase Free Space" using Disk Utility

    Hello,
    I am facing some issues related to my Time Capsule.
    Reviewing my past, I had a lot of backups on this, using Time Machine and it always worked pretty well. But after deleting some backups manually to reclaim disk space, this was not exactly freeing it.
    Searching in the forum here, I saw that I could mount the backup sparsebundle image and map it into the Disk Utility. This always worked greatly too both for disk checking and reclaiming the space back.
    The problem starts on the last Friday when I performed the operation again, but it started using the whole free space that I had and did not give it back.
    Studying the case I found that it creates a temporary folder to store the file it creates to write the byte 0 on the disk. This file actually resides in the sparsebundle image and therefore I can see the file with 200GB, for example, in the Finder, this is a split in bands (8MB) just like the backup is. After the disk gets full, the Disk Utility should delete the file properly and give me back the space safely.
    Right now my Time Capsule has 0 byte free and I can't do anything on it beyond redo the the Erase Free Space operation. When I do it, it starts writing the temporary file again and the problem repeats itself.
    I know that if I backup the data and really erase the disk, I'll get it back, but this is not an option for me because I want a smart solution for this.
    The only thing that changed between when it worked and now is the 10.5.6 update that I made and I'd like that it's not the root of the issue.
    Is there any suggestion or general stuff I could do to fix it?
    Did anybody already face the same issue?
    If anyone needs more details to help me out of this, just let me know.
    Thanks and regards,
    Eduardo

    Just another thing to add, I'd like a good solution for this as the redo operation from Disk Utility takes around 2 days and then it just "dies".

  • Erase free space function of Disk Utility

    Hi all,
    I've read some of the discussions about the problems that can result from using Disk Utility to permanently delete items that have been emptied from the Trash (and which were not "securely" emptied). Before I use the Disk Utility function, I'd appreciate some advice:
    1. I have an iBook G4, running Mac OS 10.4.11. My hard disk has a capacity of 55 GB with 30 GB available. Does the capacity available matter, and is mine sufficient?
    2. Will I be given an option on overwriting the files 0, 7, or 35 times, and should I choose 7?
    3. How long is this operation likely to take?
    4. Shall I just start the operation and then not touch the computer for a few hours, or overnight, and hope for the best??
    5. A final question (a stupid one, I hope!) -- only those files which were put in the trash will be deleted, right?? Not anything else?!
    I am quite worried about taking the step because, if things go wrong, I won't have a means of contacting the Apple support forum as this is the only computer in our household.
    I am planning on giving this iBook to a nephew in six months or so, and am gradually cleaning it up for that purpose. But I'm not ready to "zero it out" entirely and I am hoping not to lose anything currently on my hard drive following the "erase free space" operation, or to have to reboot from the original CDs.
    If the operation is successful, I will then remember to always use the "Secure Empty Trash" option when deleting future files. I'm assuming that, if I do that, I should have no concerns about giving the laptop away -- correct?
    As you can tell, I'm not very computer savvy, and I'd be very grateful for help. Thank you!

    Open Disk Utility, Highlight your drive on the left, then on the right bottom you'll see Verify Disk & below that Repair Disk grayed out because you can't reopair the HD yo're booted from, if it does need Repair...
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes

  • Disk Utility - Erase Free Space

    Hey Forum,
    I am using mac snow leopard on my macbook and I wanted to erase the free space on my hard drive, so is the zero-out free space enough, or do I need the 7-pass erase free space. I just wanted more disk space, thats it. So can anyone tell me what are each options for? And do i need to 7-pass erase if i just wanted more disk space?
    I await your favorable replies.
    Thank you.
    Regards.
    Ala.

    As The hatter says, the erase free space option has nothing to do with creating more free disk space -- the space is already free.
    If you are confused about this, just open Disk Utility to the "Erase" tab & click the purple question mark at the bottom of the window. This will open Disk Utility Help to the topic *Erasing disks*. Refer to the last subject, *Securely erasing empty space* & if necessary click the link below it to go to the help topic *Erasing free disk space*, which explains this function in more detail.
    FWIW, should you ever need to use this security function, a one pass secure erase is probably adequate to make the data unrecoverable.

  • 7-pass, or zero out-Disk Utility Erase Free Space

    Hey Forum,
    I want to clear my erase free space on disk utility. And I am confused, whether to use 7-pass or zero-out? Any suggestions which one to use. Is zero out enough, or is 7-pass too much, any suggestions of whether to use either of them is appreciated, thank you.
    Ala.
    P.S. What are zero-out, 7-pass, and the 35 thing for and their differences?

    There is no need to post the same question twice, especially in the same forum.
    Regarding what you can find with Google, an overly simplified or out of date treatment of the topic may lead you to the wrong conclusions. For example, the DoD 5220-22M standard is obsolete (& never recommended a 7 pass erase to begin with) & the 35 pass erase was intended for old, pre-2001 drives.
    For modern ATA drives like you will find in any Mac capable of running Snow Leopard, one or at most a few zero data passes will do all any software-based secure erase method can do.
    If you need verification of that, refer to the Epilogue section of Secure Deletion of Data from Magnetic and Solid-State Memory, the seminal paper on the subject by the author of the 35 pass method.

  • Disk Utility Erase Free Space Option Nonexistant

    Have an iMAC 1 GHZ PowerPC G4 256 MB DDR SDRAM OS 10.3.9. According to various google results I should be able to call up Disk Utilities>Partition>Erase>Erase Free Space. Its not there. (Its exactly where it should be on a nearby G5 running 10.5.8.).
    It will allow me to erase the entire disk or either of two partitions but the Erase Free Space isn't just grayed out, it is completely missing.
    1) The hard drive was partitioned at some point in the past I think to get around some admin thing. One partition has 51 out of 60 GB filled, the other has 12.4 of 16.3 GB filled.
    2) Don't ask about the admins, my Entourage has been broken for 9 months - I am not joking.
    3) My computer knowledge is spotty - you've been warned.
    Help!

    Try starting the iMac in Target Disk Mode while attached to one of your newer computers with a firewire cable. This basically makes the iMac an external hard drive. I've not tried this but you should then be able to use a newer version of Disk Utility on that drive.
    [How to use FireWire target disk mode|http://support.apple.com/kb/HT1661] includes description of hardware and software requirements.
    [What to do if your Mac doesn't enter FireWire Target Disk Mode|http://docs.info.apple.com/article.html?artnum=75414], also read about [Open Firmware Password Protection|http://www.apple.com/support/downloads/openfirmwarepassword.html] which can disable Target Disk Mode.
    I'm not a technician but I don't think it "misses" areas, it's just more a matter of covering up what was written there before. Think of it as you write something on a piece of paper, then erase it and write something down in the same space. If you look closely you can see what was written there before. Now erase that again and write something else. It'll be pretty difficult to make out what was written there the very first time. Do that 7 times and it will be very, very, very difficult. Do that 32 times and it will be impossible. However, all that erasing and writing will take its toll on the paper and take a long time. I'd say anything more than a erase once would really have to be justified by very sensitive data. Anybody wanting to recover the data would have to use pretty specialized equipment.

  • I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it

    I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it.
    I did this last night at 10pm thinking it would take 30 minutes to sync these 10,000 songs or so to my ipad to take up the 64 GB.  I went to bed because it was taking so long and woke up at 6am and it was just about to finish.  It finished around 630am.  So it took a good 8 hours to sync.
    I unhooked it and used it for an hour or so and then hooked it backup so that I could update a few apps on it.  When i did that it acted like it was re-adding all of those songs again and it took about 8 hours again to sync all the music.  Was that just a fluke because I made changes to the ipad?  or will it always calculate and then re-sync alllllllllllllllllll of those 10,000 songs?
    Thanks so much for any help!!!
    -Michael

    Anyone?

Maybe you are looking for

  • How can I cut a section of video, but leave the audio playing?

    iMovie 6 Hi, I want to edit, or remove a small section of video, but leave the audio playing in the background. I want to just put up a picture in the same spot. But, I need the video's audio to keep playing. I videotaped someone speaking, but there

  • Which are the standard assignment blocks that should appear in SAP Product?

    Hello Guru's Currently I am creating some new products to check the fields available in every assingment block within the product, when I create my new transaction and add a new position (product) I went in the link to see the product information whi

  • Noted items/ Normal Items/ Special G/L Transaction

    Hello all, I need again your help. In a report are read docs from BSEG table (BSIS, BSAS, BSID, BSAD, BSIK,BSAK). The selection screen must have 3 checkboxes for normal-items, noted-items and Special G/L Transactions (something like block type in sel

  • Slip streaming SP2 with Windows XP on a mac

    Ugh! need to have a step by step method (using a mac) of how to slip stream SP2 (service pack 2) to Windows XP home edition (if possible using Recovery CD's that came with my windows laptop), so I can have a single install disc of Windows XP with SP2

  • Uploading to Lightroom

    I am fed up with the upload times from my Nikon D4 and Nikon D800E cameras to Lightroom, they have the latest firware....yet it is taking 15 hours sometimes much longer to upload 10 Gig of images it is time i can ill afford....im tempted to dump my L