How to force deletion of a partition with DiskPart

DiskPart is a powerful command-line utility that lets you manage your hard drives/SSDs and their partitions in 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 leader !

Summary
  1. Delete a partition in Windows: what are the solutions?
  2. Delete partition with DiskPart

Delete a partition in Windows: what are the solutions?

To delete a partition from a hard disk, SSD or USB key in Windows, two solutions are available to you :

The first is to use the Windows built-in Disk Management tool . With this tool, you can manage your disks and partitions from a graphical interface. For example, you can create, delete, format, resize and modify the partitions of your disks as you see fit. 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, I am unable to delete the EFI partition from my USB drive, the option is grayed out…

In this specific case, you can use the second tool built into Windows, namely commands/diskpart” target=”_blank” rel=”noreferrer noopener”>DiskPart . It is a command line tool that runs in the Windows Terminal (or in a Command Prompt window). DiskPart offers even more options to manage your disks and unlike the Disk Management tool, it doesn’t shy away from anything! So you will have no trouble deleting a partition using this tool. Let’s see together how to use DiskPart to force delete a partition.

See also  How to activate Best Performance Mode in Windows 11

Delete partition with DiskPart

To force delete a partition using DiskPart, follow these steps:

1. Start by opening the Windows Terminal as an administrator. To do this, right-click on the Start menu, then select ” Windows Terminal (administrator) “.

2. From the Windows Terminal, type the following command and validate with Entrée. This will run the DiskPart tool.

diskpart
DiskPart

3. Next, type the following command to display the list of disks for the purpose of retrieving its number . In my example, I’m interested in “Disk 1”.Warning : To be sure to retrieve the correct disk number, you can look at its size or use the Disk Management tool.

list disk
Show list of disks with DiskPart

4. Now you need to select the disk by typing the following command: Note : of course, replace the number “1” in the command with the number that corresponds to your drive number.

select disk 1
Select disk with DiskPart

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 that 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 that corresponds to your drive’s partition number.

select part 1

7. To delete a partition with DiskPart, you normally need to run the command delete partition. However, as you can see in the screenshot below, this command fails because the disk partition is protected. To force delete the partition, go to step 8.

delete partition

8. To force delete the disk partition, type the following command. Once deleted, 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 the DiskPart command line tool!

5/5 - (2 votes)

Newsletter Updates

Enter your email address below to subscribe to our newsletter

Leave a Reply