How to totally erase data on a hard disk or usb stick

Hello everyone

I have an old hard disk that a would like to use but before installing in my Linux box, i want to completely erase the data stored on it.

Are there any Linux commands or utilities that i can use to accomplish this.

I would also want to know why Linux utilities such as **mkfs ** do not completely erase data on a disk.

Thanks

Hi,

This can be done by writing zero’s to the disk using DD
dd if=/dev/zero of=/dev/sda bs=4k

if == the input device
of = the disk you want to wipe

This is dangerous so be careful and read this to get a full explanation

cheers

tony

1 Like