How To Erase All Partitions On Hard Drive | Full Disk Wipe

The DiskPart clean command removes every partition from a hard drive in one step, leaving unallocated space ready for a fresh partition layout.

A single command wipes the entire partition table off a drive — and one wrong disk number makes that drive your operating system. The DiskPart clean command is the fastest way to erase all partitions on a hard drive, but it rewards caution. Unlike Disk Management or the Settings app, which require deleting each partition individually, DiskPart removes the partition table as a whole, leaving the drive as unallocated space in about one second.

This article covers every method that genuinely works for erasing all partitions on a hard drive in Windows — from the one-command DiskPart approach to the slower graphical alternatives. You’ll also learn how to avoid selecting the wrong disk, how to handle protected partitions that refuse to delete, and which method fits your specific goal.

Why The DiskPart Clean Command Is The Best Choice

The DiskPart clean command is the only built-in Windows utility that removes every partition on a drive simultaneously. It accomplishes this by deleting the partition table — the invisible data structure Windows uses to locate each partition — which instantly renders every partition on that drive inaccessible. The drive then appears as unallocated space, ready for a new partition layout or file system.

The speed advantage is significant: clean executes in roughly one second. The clean all variant writes zeros to every sector, which provides secure erasure but takes hours on larger drives, especially HDDs. For SSDs, plain clean is normally sufficient unless you plan to sell or donate the drive. Running clean all on an SSD performs unnecessary writes that consume the drive’s limited write cycles without meaningful benefit for most users.

Which Method Removes All Partitions On A Hard Drive At Once?

Only two built-in methods can erase all partitions on a hard drive in a single operation: DiskPart with the clean command, and deleting partitions during a Windows installation. All graphical tools — Disk Management, Windows 11 Settings, and third-party apps — either delete one partition at a time or bundle the operation into a single click. The table below shows how each method compares.

Method Removes All Partitions At Once? Ideal Use Case
DiskPart clean Yes Fast complete wipe, reformatting
DiskPart clean all Yes, with secure overwrite Selling or donating the drive
Disk Management No, delete one by one Removing a single partition
Windows 11 Settings No, delete one by one Visual GUI method for single partitions
Windows Setup Delete Yes, delete each during install Clean OS installation
DiskGenius Yes, one-click button GUI bulk deletion without commands
Windows Recovery Environment Yes, via DiskPart from recovery Erasing the active OS drive

How Do You Use DiskPart To Erase All Partitions?

Using DiskPart requires opening an administrator-level command prompt and running a short sequence of commands. The entire operation takes under a minute for the clean command itself, with the drive emerging as unallocated space afterward.

  1. Press Win + S, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Type diskpart and press Enter to launch the disk partitioning utility.
  3. Type list disk and press Enter to display all connected drives with their sizes.
  4. Identify the target drive by matching its size in gigabytes. Write down its disk number.
  5. Type select disk X, replacing X with the disk number from step 4.
  6. Type clean and press Enter — the partition table is erased instantly. Or use clean all for sector-level overwrite, which takes considerably longer.
  7. Type exit to close DiskPart.

After clean completes, the drive shows as Unallocated in Disk Management with no partitions listed. You can then create a new partition by right-clicking the unallocated space and selecting New Simple Volume, or by using create partition primary followed by format fs=ntfs quick in DiskPart.

What Happens If You Select The Wrong Disk?

This is the most expensive mistake in disk management. Selecting Disk 0 — the drive Windows is installed on — and running clean destroys the operating system and all data on it, making the PC unbootable. The only reliable safeguard is to verify the disk number by checking the size column in list disk before running select disk. The size matches the drive’s exact capacity, which is harder to confuse than a number.

The clean command is non-reversible. It doesn’t move files to a recycle bin; it removes the partition table itself. Data recovery is technically possible but requires specialized forensic tools and typically costs hundreds of dollars with no guarantee of success. Back up anything important before running this command, and double-check the disk number before pressing Enter.

How To Force-Delete Protected Partitions

Standard graphical tools often fail on OEM, Recovery, or System Reserved partitions because Windows locks them as essential. DiskPart handles these with the delete partition override command. After selecting the disk with select disk X, run list partition to see the protected partition, then select partition Y and type delete partition override. This bypasses the usual protection flags and removes the partition. A Microsoft Tech Community discussion on force-deleting partitions confirms this method works on both Windows 10 and 11, including for partitions that Disk Management refuses to touch.

Choose The Right Erase Method For Your Situation

Each method serves a different scenario. This table matches your specific goal to the right tool and explains why.

Your Goal Recommended Method Why It Fits
Fastest partition removal DiskPart clean One second, one command, no clicks
Secure data destruction DiskPart clean all Zeroes every sector, prevents recovery
Visual walk-through Disk Management Familiar right-click interface
Windows 11 modern UI Windows 11 Settings Clean settings layout for single partitions
During OS installation Windows Setup Delete Built into the installer workflow
Protected partition removal DiskPart delete partition override Bypasses OEM and recovery locks
Bulk GUI deletion DiskGenius “Delete All Partitions” button in one click

Whichever method you pick, verify the disk number before executing any destructive command. The one second it takes to double-check saves hours of recovery work — or the cost of a new drive. Once the partitions are gone, the drive becomes unallocated space, ready for a fresh partition layout, a new operating system, or secure disposal.

References & Sources

Please use a real email you check. If it's fake or mistyped, your message won't reach us and we can't reply — wrong addresses are rejected automatically.