SOLVED: Easy Command Line to Wipe and Reformat a Disk

UPDATE: Feb 1 2020 – These commands still work but we have a lovely script that works much faster and can even overwrite data if need be.  That disk wipe script is available HERE.

_____________________________

In 2017 we recorded a video on how to remove partitions through command line. This is especially useful when they are stuck or refuse to be deleted through the DISK MANAGER console because they are protected system partitions.

Today we explain how to remove partitions, including protected partitions, and reformat a previously used disk.

The following commands work in old school CMD, newer school PowerShell or even the tomorrows school Windows Terminal:

  1. Open a command line as an administrator
  2. type diskpart and press the enter key
  3. type list disk and press the enter key
  4. type select disk X (X = the disk you want to wipe out) and press the enter key
  5. type clean and press the enter key
    1. if you need to ensure all data is truly wiped out you can use clean all, but a 1TB disk will take more than a dozen hours to complete
    2. if you need to stop a clean all command, click HERE for instructions.
  6. type create partition primary and press the enter key
  7. type format fs=ntfs quick and press the enter key
  8. type assign letter=E and press the enter key
  9. have a nice day

 

 

View Comments

  • was adviced not to do a clean all for SSD as it reduces its read and write/lifespan, i also ended up interrputing a clean all command by restarting and encountered
    Error Code 0xc000000

    followed this steps from: @sethb9554
    1. From your recovery drive (usually X:), search for your drive with your windows installation by typing dir c: then dir d: dir e: so you know which one it is.
    2. Type bcdboot E:\windows ( Mine was on E: )
    3. Restart.

    just leaving here in case someone has the same problem! thank you for the guide!

Published by
Ian Matthews

This website uses cookies.