I am about to sell a bunch of hard drives (not an SSHD or an SSD, all are normal HDDs).

As I wanted to overwrite it literally 10 times, I was unsure how to execute a pure pv overwrite * 10, so I came across a handy utility called shred and executed it as follows:

shred --verbose --random-source=/dev/urandom --iterations 10 --zero /dev/sda

So, the total data destruction is in progress, and I have no question about it.

The reason I am asking you about instructing me how to do the Secure Erase came to me from another SE site, more specifically this answer, which led me to thinking, there may be one final round of this pre-sale preparation. I came across some host protected area, which I am unsure, whether my command erased even that or not.

I am unsure whether just go ahead and do things mentioned on this web page, or only wait for the aforementioned command to finish and sell it right away.


It is not necessary to overwrite more than once for drives larger than 15GB, and it is not significant whether random data or zeros is used. Using zeros is probably less confusing all around.


You command will not erase the host-protected area. On the other hand, nor will your operating system have written any confidential information there.

Personally I would use a secure erase to handle device-specific features. For example, it might make an effort to destroy remaining data present on any remapped (bad) sectors. However I wouldn't 100% assume the drive gets it right without checking it. So running an overwrite pass before or after makes sense to me.

When I tried secure erase on an SSD, it did not seem to purge the cache of the partition table / start of the drive. I say the cache, because it went away on a reboot. But it makes me a bit uneasy - I prefer to run the overwrite pass after the secure erase.

If you were processing an SSD, you would also want to run an erase after the overwrite, to guarantee optimal performance.

| improve this answer | |

All further steps besides shred are only to ensure that somehow professional attackers would not be able to restore your data. If you do not have really confidential information, shred should do the job (maybe additionally using it with -u). But it also does not harm to additionally use one run with nwipe or wipe or even ATA Secure Erase, if you have the time and makes you feel safer. I personally mostly do just an dd if=/dev/urandom of=/dev/sdX whereafter tools like testdisk do not find anything leftover which I decide is enough for me.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.