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.
- Open the Run window (Win + R).
- Type "diskmgmt.msc" and click "OK".
- Note down the disk number you want to wipe using diskpart.
- Once you have the disk number, press the "Windows Key" to open the Start menu.
- Search for the "Command Prompt".
- Right-click on the Command Prompt result and select "Run as administrator".
- After opening the Command Prompt with admin rights, type "diskpart" and press Enter.
- You will be in the diskpart tool. Now, execute the "list disk" command to list all available disks.
- As soon as you execute the command, it will display all the disks in your system. Identify the disk you want to wipe.
- Next, execute "select disk #number" to select the target disk. Replace "#number" with the actual disk number.
- Once the disk is selected, type "clean all" and press Enter.
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.
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.