Commands · Command
CommandWindows
diskpart
diskpart (opens an interactive prompt with its own commands)A powerful, low-level disk and partition management tool — create, delete, resize, and format partitions and volumes.
// FLAGS
list disk / list volumeshow disks or volumesselect disk Nchoose a disk to operate oncleanwipe a disk's partition tablecreate partition primarycreate a new primary partition// EXAMPLE
Running diskpart, then list disk, select disk 1, clean, create partition primary — the standard sequence to completely wipe and re-partition a disk.
// GOTCHA
clean erases the entire selected disk's partition table with no confirmation prompt — selecting the wrong disk number is catastrophic and unrecoverable without a backup.
// RELATED COMMANDS