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.

command line to wipe a disk create new partition and formatThe 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

 

 


4 Comments

faq · June 27, 2023 at 10:48 am

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!

Joe Mama · February 26, 2022 at 8:21 am

Couldn’t delete some partition, that resolve the problem. Great tutorial !

    Ian Matthews · March 2, 2022 at 5:38 pm

    Hi Joe. We are glad it helped. Thanks for reading and commenting!

John Doe · August 10, 2020 at 7:37 pm

This is superb. Disk Management was a hassle. Nothing worked. Much better alternative.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *