How to Use Diskpart to Delete All Partitions on Disk

Diskpart has a specific command to delete partitions in Windows. Here’re the exact steps you should follow to force delete partitions with diskpart command.

You can easily partition the hard disk into multiple sections called partitions using the Disk Management tool or the Diskpart command-line tool. Partitioning allows you to better manage the file and folder structure. However, there might be times when you need to delete all the partitions on a disk. For instance, if the partition layout is all over the place or if the partitions are not of the right size, then deleting and re-partitioning is the way to go.

Thankfully, you can use the diskpart command to delete partitions at once in Windows. All you have to do is, point the disk to the diskpart tool and issue the delete command.

In this quick and simple guide, let me show you the steps to delete disk partitions with Diskpart command in Windows.

Important Note: Before deleing partitions, I strongly recommend you back up all the data to an external drive. Once you delete the partitions, all your data will be lost.

Note: You cannot but also don’t try to delete system partitions.

How to Delete All Partitions using Diskpart Command

To use diskpart to remove all partitions, you first need to know the actual disk number and then execute the command. Follow the steps shown below.

  1. Open the Run window (Win + R).
  2. Type “diskmgmt.msc” and click “OK“.
  3. Note down the disk number you want to wipe using diskpart.
    Disk-number-is-disk-management-tool-210820
  4. Once you have the disk number, press the “Windows Key” to open the Start menu.
  5. Search for the “Command Prompt“.
  6. Right-click on the Command Prompt result and select “Run as administrator“.
  7. After opening the Command Prompt with admin rights, type “diskpart” and press Enter.
    Diskpart-command-210820
  8. You will be in the diskpart tool. Now, execute the “list disk” command to list all available disks.
    List-disk-command-210820
  9. As soon as you execute the command, it will display all the disks in your system. Identify the disk you want to wipe.
  10. Next, execute “select disk #number” to select the target disk. Replace “#number” with the actual disk number.
    Select-disk-command-210820
  11. Once the disk is selected, type “clean all” and press Enter.
    Delete-all-partitions-diskpart-command-210820

That is it. As soon as you execute the clean all command, diskpart will delete all partitions and mark it as unallocated. You will see the “DiskPart succeeded in cleaning the disk” message once it is done.

Since the disk is marked as unallocated, you can partition and format it as needed. Just open the Disk Management tool with the “diskmgmt.msc” run command, right-click on the disk, select “New simple volume” and follow the wizard.

Create-new-partition-disk-management-210820

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. Other than deleting, you can also extend partitions using diskpart. Check out the liked guide if needed.

Scroll to Top