DiskPart is a powerful command line utility that allows you to manage your hard drives/SSDs and their partitions under Windows. It can be used to create, delete, format and resize partitions. In this article we will show you how to use DiskPart to force delete a partition. Follow the guide!
Contents
- Delete a partition in Windows: what are the solutions?
- Delete a partition with DiskPart
How to Force Delete A Partition on Windows 11
To remove a partition from a hard disk, SSD or USB key under Windows 11, you have two solutions:
The first one is to use the Disk Management tool integrated in Windows. With this tool, you can manage your disks and partitions from a graphical interface. For example, you can create, delete, format, resize and modify your disk partitions as you wish. What’s more, it also provides information about your disks and partitions, including their size, type, status (healthy or not), etc.
The problem with this tool is that it can sometimes be recalcitrant. Indeed, as you can see in the screenshot below, it is impossible for me to delete the EFI partition of my USB key, the option is grayed out…
In this case, you can use the second tool integrated in Windows, namely DiskPart. It is a command line tool that runs in the Windows Terminal (or in a Command Prompt window). DiskPart offers even more options for managing your disks and unlike the Disk Management tool, it doesn’t shy away from anything! So you will have no trouble deleting a partition with this tool. Let’s see how to use DiskPart to force the deletion of a partition.
How to Delete a Partition on Windows 11 with DiskPart
To force delete a partition on Windows 11 using DiskPart, do the following:
1. Start by opening Windows Terminal as an administrator. To do this, right-click on the Start menu and select "Windows Terminal (Administrator)".
2. From the Windows Terminal, type the following command and confirm with Enter. This will run the DiskPart tool.
diskpart
3. Then, type the following command to display the list of disks in order to recover its number. In my example, I am interested in "Disk 1".
Warning: To make sure you get the right disk number, you can look at its size or use the Disk Management tool.
list disk
diskpart
4. Now you have to select the disk by typing the following command:
Note: of course, replace the number "1" in the command with the number of your drive.
select disk 1
5. Now that the disk is selected, type the following command to display its partitions.
list part
6. In my case, the drive has only one partition, the one I couldn’t delete with the Disk Management tool. To delete it, you must first select it. To do this, type the following command:
Note: again, replace the number "1" in the command with the number of the partition on your drive.
select part 1
7. To delete a partition with DiskPart, you should normally execute the delete partition command. However, as you can see in the screenshot below, this command fails because the disk partition is protected. To force deletion of the partition, go to step 8.
delete partition
8. To force deletion of the disk partition, type the following command. After deletion, you will get the following message: "DiskPart has successfully deleted the selected partition".
delete partition override
✅ That’s it, now you know how to force delete a partition with DiskPart command line tool!