Sterilizing a hard drive with diskpart.exe

Sometimes you need to ensure that a hard drive is completely sterilized (erased) and that all data is actually removed.

So to securely wipe (zero-out) a drive, boot the system with a WinPE boot CD/Flash or boot floppy (Windows 98) that has a copy of the diskpart.exe utility on it.

Run the following commands in an elevated command prompt (assuming that the drive to be wiped, in this case, is disk 0.

Select disk 0
clean all

Note: The time that passes between steps 3 and 4 is dependent on many factors including the hardware of the system, drive speed, and your patience level.  Eventually it will return to the diskpart prompt and you can exit out.

Running a MD5 hash against the drive and getting a 0 checksum will confirm that the drive has been wiped.

Dave Bowman

Comments (0)

Skip to main content