Diskpart Delete Partition – Windows

Diskpart is a powerful command-line tool included in Windows that allows you to manage your disks and volumes. One of the things you can do with the “diskpart” command is delete a partition on your hard drive. This can be useful if you want to remove an unused partition forcefully or reformat your drive.

In this article, I’ll walk you through the steps to use diskpart to delete a partition in Windows 10 or 11.

Diskpart Delete Partition

Prerequisites

Before deleting a partition in Windows, it’s important to understand what you’re deleting and the implications. When you delete a partition, you will lose all data stored on that partition permanently. So don’t delete partitions that contain important files you want to keep!

It’s also a good idea to backup any data you want to save before deleting a partition. And make sure you identify the drive letter or name of the partition you want to delete to avoid accidentally removing the wrong one.

Diskpart Delete Partition – Steps

Using Diskpart to delete a partition doesn’t require any special downloads or configuration.

Follow these steps: (All the below commands can be seen in the image after these instructions)

  1. Type ‘diskpart’ in the Windows command line prompt or press CTRL +R to bring the run window and type ‘diskpart‘ to open diskpart command console or cli.
  2. Type ‘list disk‘ and identify the disk number of the disk containing the partition you want to delete. Make note of the size to verify it’s the correct disk.
  3. Type ‘select disk X‘ where X is the disk number. This will select the target disk. We are selecting disk 3 in this example.
  4. Type ‘list partition‘ to view the partitions on the selected disk. Identify the partition number of the partition to delete.
  5. Type ‘select partition Y‘ where Y is the partition number. This marks the target partition.
  6. Type ‘delete partition override‘ to delete the selected partition. Use the override option to force deletion.
  7. Type ‘clean‘ to fully remove the partition.
  8. Type ‘exit‘ to close the Diskpart console

The partition is now deleted. You can use disk management or diskpart to create a new partition if needed.

Below is the command to create a partition, follow the above steps from 1-4.

  1. Type ‘create partition primary’ to create a new primary partition in the freed space if desired.

You can see diskpart delete partition in action through the below screenshot.

In the below example, we have delete the partition having system files. Don’t delete those as they are Windows system & recovery files.

Diskpart Delete Partition - command line

Additional Examples

Here are some additional examples of using diskpart command to delete partitions:

1. Delete partition 2 on disk 1:

select disk 1 
select partition 2 
delete partition override

2. Delete partition with volume label “Data”:

select volume Data 
delete partition override

3. Delete system partition:

select disk 0 
select partition 1 
delete partition override

As you can see, diskpart provides a simple way to delete partitions directly from the Windows command line. Just be sure you select the correct disk and partition to avoid deleting the wrong volume. And remember – deleting a partition removes all data, so back up anything important first!

Buy me a coffeeBuy me a coffee

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.