It’s not often but there will be times when might want to delete all the partitions on a disk. For example, maybe you are reallocating the space, converting dynamic disk to basic, scrapping or giving away your hard, etc. The good thing is that you can use the built-in diskpart command to delete partitions on a disk quickly and efficiently. You don’t have to use any third-party app or navigate through a maze of options in the Disk Management tool.
In this quick and simple tutorial, I will guide you through the steps of using the diskpart command line tool to delete disk partitions in Windows 10 and Windows 11. Let’s get started.
Before You Start
- You need administrator rights to delete partitions using diskpart.
- Deleting partitions causes data loss. So, backup all the data on the disk before deleting partitions.
- After deleting the partitions, the space is marked as unallocated. You need to manually allocate the space as you need.
- You cannot delete the system partition with diskpart.
- The steps below have been tested to work on Windows 10 and Windows 11.
How to Delete All Partitions using Diskpart Command
- Press the Start button on your keyboard.
- Search for “Command Prompt“.
- Click the “Run as Administrator” option.
- Type “diskpart” and press Enter.
- Type “list disk” and press Enter.
- Identify the disk in which you want to delete partitions and note down the disk number.
- Type “select disk X” (replace X with the disk number) and press Enter.
- Type the “clean all” command and press Enter.
- Run the “exit” command to get out of the diskpart instance.
- With that, you’ve deleted all the partitions on the disk.
Detailed Steps (With Screenshots)
First, we need to open Command Prompt as admin. To do that, press the Start button to open the Start menu, search for “Command Prompt”, and click the “Run as Administrator” option.
Once it opens, type “diskpart” in the Command Prompt window and press Enter. This action launches the diskpart tool in the Command Prompt window.

Next, run the “list disk” command to list all the disks on your computer. From the list, identify the disk in which you want to delete all the partitions and take note of its disk number. For instance, my disk number is 5.
Note: If you are unable to identify the disk, you can use the Disk Management tool to make it easy. To do that, right-click the Start button on your taskbar and select “Disk Management” to open the disk management tool. Next, identify the disk in the bottom panel and note down its number.

Now, type “select disk X” and press Enter. Don’t forget to replace “X” with the disk number.

Once the disk is selected, type “clean all” and press Enter. This command immediately deletes all the partitions on the disk. You will see the “DiskPart succeeded in cleaning the disk” message.

After that, type “exit” and press Enter to exit the diskpart tool. Next, close the Command Prompt window by clicking the “X” button on the title bar.
Now, the entire disk is marked as unallocated. That means, it is not visible in the File Explorer and you can allocate the space however you want. To do that, open the Disk Management tool with the “diskmgmt.msc” run command, right-click on the disk, select “New simple volume” and follow the wizard.
Note: If you are creating multiple partitions on a disk, make sure to allocate the space as required for each partition. If you make a mistake, simply delete the partition and try again. Alternatively, you can also resize the partition using diskpart.

Wrapping Up — Deleting All Partitions Using Diskpart
As you can see, when are in need, the diskpart tool helps you quickly delete all the partitions or drive on a disk with just a couple of commands. All you have to do is launch the diskpart utility, select the disk, and issue the “clean all” command. Keep in mind that this process deletes all the data on the disk. So, backup before deleting partitions.
If you have any questions or need help, comment below. I’ll be happy to assist.
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.
You can just use “clean” instead of “clean all” if you happy to have the disk just “marked deleted” not actually deleted.
“clean all” can take hours depending on the size of your disk.