Ubuntu – How to wipe a hard disk completely so that no data recovery tools can retrieve anything?


How can I do a disk low level formatting in Ubuntu on an external hard disk so that any data recovery tools like test-disk or photorec cannot retrieve any data once formatted to ext4 or any file-system? As I was playing around with Test disk, I found that it can recover almost all old files even after formatting it many times and I want to use my external hard disk as new because it is only one year old and in warranty but without any old data.

Best Answer

  • I use shred when selling old hard drives, use man shred for more information:

    shred -vzn 0 /dev/xxx

    You can specify n number of times to overwrite and z to overwrite it all with zeros at the end.

  • Related Question