Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking for a comparatively fast way to securely delete a hard drive I intend to sell and I found this in a German Ubuntu wiki:

wipe -q -Q 1 -R /dev/zero -S r -r $PATH

It said that according to contemporary research this would suffice. Is that true? Because it was done in one second:

arno@arno-X55A:~$ sudo wipe -q -Q 1 -R /dev/zero -S r -r /dev/sdb
Okay to WIPE 1 special file ? (Yes/No) Yes
Renaming                         /dev/sdb ->                         /dev/u8jSynOperation finished.
0 files wiped and 1 special file ignored in 0 directories, 0 symlinks removed but not followed, 0 errors occured.

Using the standard wipe command resulted in an ETA of 2 years for my 2 tb hdd.

share|improve this question
The -Q 1 tells it to do 1 pass. Default is 4 and more passes is better ;) If you drop the -q too it should do 34 passes (8 of those are random). – Rinzwind Apr 13 '13 at 11:49
2… – Rinzwind Apr 13 '13 at 12:09
The guy in the post says it took him 20min for a 4 gb drive using shred. That would be 167 HOURS for me 2 tb drive. That is a little to long... The point here is to find a comparatively quick solution for large drives. – H3R3T1K Apr 13 '13 at 13:04
shred is not the one you want (you can recover from shred if I read the bottom answer correctly). see the wipe answer. That should do it (not slow either though but the amount of passes is crucial. Try with 2, 4, 8 and see how long it takes) ;) – Rinzwind Apr 13 '13 at 13:05
up vote 2 down vote accepted

If you look at the output of the command you ran, you can see that the wipe command did not in fact do anything, it ignored the hard disk:

0 files wiped and 1 special file ignored in 0 directories, 0 symlinks removed but not followed, 0 errors occured.

The man page for wipe indicates that this is the way to delete entire disks by specifying a special file:

wipe -kqD /dev/sdb

-k indicates that the file /dev/sdb should be kept and that wipe shouldn't attempt to delete it. -q means that wipe will make four passes (considered quick). -D means follow symlinks if /dev/sdb happens to be a symlink.

You can add the other options mentioned in your question, but I think -k would be essential for a special file.

If that still doesn't work, have a look at this question for other methods: How can I securely erase a hard drive?

share|improve this answer
Thank you! Can you tell me what a symlink is? – H3R3T1K Apr 14 '13 at 10:17
OK it's been running a few hours and I have an ETA of 11 weeks. There must be something quicker. There wasn't any sensitive data on the device. I just don't want some curious user to dig up anything that doesn't concern him. It doesn't have to stand up to a forensic lab. Isn't there anything quicker? And please rename the title to "quick way of securely erasing large drives" or something. – H3R3T1K Apr 14 '13 at 15:19
@Arno: then open pass should be sufficient: wipe -kD -Q 1 /dev/sdb. If you don't care about security at all, you can delete all the partitions using a tool like Gparted, which will take less than a minute. – Flimm Apr 15 '13 at 8:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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