
Ask HN: What's the best way to delete all data off of a drive? - tbirdz
I have a laptop that I want to sell, but on the hard drive I used to keep sensitive information, like tax records, personal photos, etc. What is the best way of processing this drive to remove all of this, and make it so no one could be able to recover it?
======
voltagex_
I can't find it but there's a $10k prize around for anyone able to recover
data from a drive overwritten once with all zeros.

Use something like DBAN [1] and forget about it.

(Happy to be corrected)

[1]: [http://www.dban.org/](http://www.dban.org/)

~~~
matt_heimer
I don't think only writing zeros is considered safe, I mean it probably is for
most purely software based recovery methods but I don't think it is for
agencies with money to build the right hardware. Look into DoD 5220.22-M.

~~~
voltagex_

      for ATA disk drives manufactured after 2001
      (over 15 GB) clearing by overwriting the media once is adequate to protect the media from
      both keyboard and laboratory attack.
    

\--NIST, 2006 -
[http://csrc.nist.gov/publications/nistpubs/800-88/NISTSP800-...](http://csrc.nist.gov/publications/nistpubs/800-88/NISTSP800-88_with-
errata.pdf) (page 14)

Found that while looking up the DoD standard, interesting stuff - thanks!

~~~
matt_heimer
If you found that interesting you probably also like some of the research into
sanitizing SSDs -
[https://www.usenix.org/legacy/events/fast11/tech/tech.html#W...](https://www.usenix.org/legacy/events/fast11/tech/tech.html#Wei)

------
jacquesm
Depending on your degree of paranoia:

If you're just an ordinary Joe/Joelle:

\- write 'all zeros' to the whole drive

If you've been committing small time crime:

\- (the above+) write 'all ones' to the whole drive

If you're a big time crime boss (say Escobar level):

\- (the above+) disassemble the drive

If you're either Edward Snowden or Julian Assange:

\- (the above+) smash controller to bits, sandpaper platters

If you're Osama Bin Ladens cleaning lady:

\- (the above+) melt down the drive elements

Imho anything above except for step (1) is overkill.

------
matt_heimer
[http://www.ultimatebootcd.com/](http://www.ultimatebootcd.com/) has a
selection of tools for disk wiping.

If it is a Windows machine and you are trying to leave Windows in-place (not
recommend) you can at least delete your user account, empty the trash can, and
then run a program like SDelete - [http://technet.microsoft.com/en-
us/sysinternals/bb897443.asp...](http://technet.microsoft.com/en-
us/sysinternals/bb897443.aspx)

------
PaulRobinson
I used to work with classified data.

"We" incinerated hard drives at EOL.

"We" did that for a reason. Anything short of destruction means the data can
be recovered if somebody has enough will.

------
sbierwagen
[http://en.wikipedia.org/wiki/Shred_%28Unix%29](http://en.wikipedia.org/wiki/Shred_%28Unix%29)

    
    
      shred is a Unix command that can be used to securely delete 
      files and devices so that they can be recovered only with 
      great difficulty with specialised hardware, if at all. It 
      is a part of GNU Core Utilities.

------
adventured
The best way to go about this is to "zero fill" the drive.

[http://gizmodo.com/5494427/leave-no-trace-how-to-
completely-...](http://gizmodo.com/5494427/leave-no-trace-how-to-completely-
erase-your-hard-drives-ssds-and-thumb-drives)

------
fraqed
Before you wipe the drive you could do a whole drive encryption with TrueCrypt
or BitLocker and then use DBAN for spinning drives or Secure Erase for SSDs.

------
valleyman
dd if=/dev/zero of=/dev/yourharddrive

------
lightblade
I like to know the most secure way to wipe a SSD. Apparently the google
doesn't have much on it.

~~~
sbierwagen
SSDs can only tolerate a limited number of writes. A secure wipe of a SSD
would significantly reduce its lifespan.

~~~
lightblade
I know, which is also why it's so hard to wipe it. It seems that SSDs are
built with self preservation in mind and it'll try its hardest to avoid a
write.

------
NicoJuicy
People can recover more then 1 rewrite (zero's and 1's) easily.

Do it 50 times, then it should be safe (if your paranoid, melt the drive
though)

~~~
zorlem
It would be nice if you quoted some reputable source or research when making
such bold claims.

Who are the people that can recover more than 1 rewrite easily from a modern
hard disk drive, do you have any URLs at hand?

You could check Peter Gutmann's research titled "Secure Deletion of Data from
Magnetic and Solid-State Memory" [1] from 1996 which is one of the original
sources for "35-cycle erase" [2]. In this paper he states that it is possible
to recover the data using a specialized microscopy equipment (using Magnetic
Force Microscopy or MF Scanning Tunneling Microscopy techniques). These
techniques are only applicable for mediums with a much lower magnetic density
and much simpler encoding than are used these days (eg. RLL encodings like
MFM, PRML, etc.).

How did you arrive at the number 50? In the epilogue of his paper Gutmann
states:

 _In fact performing the full 35-pass overwrite is pointless for any drive
since it targets a blend of scenarios involving all types of (normally-used)
encoding technology, which covers everything back to 30+-year-old MFM methods
(if you don 't understand that statement, re-read the paper). If you're using
a drive which uses encoding technology X, you only need to perform the passes
specific to X, and you never need to perform all 35 passes._

tl;dr: overwriting 35 times is a pointless waste of time and is one of the
popular myths that refuses to die. Using shred under GNU/Linux or DBAN to
overwrite with some random data is more than sufficient for our purposes.

[1]:
[https://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html](https://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html)

[2]:
[http://en.wikipedia.org/wiki/Gutmann_method](http://en.wikipedia.org/wiki/Gutmann_method)

