Guides & Tutorials

How to Delete and Recreate a Disk Partition in Windows 11 Using CMD

How to Delete and Recreate a Disk Partition in Windows 11 Using CMD

Quick Summary

  • Windows 11 allows you to delete and recreate disk partitions using Command Prompt.
  • The diskpart utility can remove existing partitions and create new ones.
  • Deleting a partition permanently removes the data stored on it, so back up important files first.
  • Carefully verify the disk and partition number before running any delete command.

Why Delete and Recreate a Partition?

You may want to delete and recreate a partition when troubleshooting disk issues, changing the partition layout, preparing a drive for a fresh installation, or removing an unwanted partition.

How to delete and recreate a partition using CMD in Windows 11
Use Windows 11 DiskPart commands to delete and recreate a disk partition.

Windows 11 includes the built-in DiskPart command-line utility, which provides detailed control over disks, partitions and volumes.

Warning: The commands below can permanently erase data. Do not continue until you have backed up any important files and confirmed the correct disk and partition numbers.

Step 1: Open Command Prompt as Administrator

  1. Press Windows + S.
  2. Search for Command Prompt.
  3. Right-click Command Prompt.
  4. Select Run as administrator.
  5. Click Yes when the User Account Control prompt appears.

You can also open Windows Terminal (Admin) and use the same commands.

Step 2: Start DiskPart

Enter the following command:

diskpart

Press Enter.

You should now see the DiskPart command prompt.

Step 3: Scan and List Available Disks

Before deleting anything, identify the correct physical disk:

list disk

DiskPart will display the available drives.

For example:

Disk ###  Status         Size
--------  -------------  -------
Disk 0    Online         476 GB
Disk 1    Online         931 GB

Do not select a disk based only on its number. Compare the displayed size with the physical drive you intend to modify.

ALSO READ How to Identify Phishing Emails

Step 4: Select the Correct Disk

If the target is Disk 1, enter:

select disk 1

Then verify your selection:

detail disk

Check the disk information carefully before continuing.

Step 5: List the Partitions

Now display the partitions on the selected disk:

list partition

You may see something similar to:

Partition ###  Type        Size
-------------  ----------  -------
Partition 1    Primary      500 GB
Partition 2    Recovery    1000 MB

Identify the partition you want to remove.

Step 6: Select the Target Partition

For example, to select Partition 1:

select partition 1

Then verify it:

detail partition

Make absolutely sure this is the partition you want to delete.

Step 7: Delete the Partition

For a normal data partition, you can use:

delete partition

If DiskPart refuses to delete the partition because it is protected, you may see an error. The override option can force deletion:

delete partition override

Use override only when you are certain that the selected partition is the correct one.

Do not use these commands casually on your Windows system, EFI, recovery or other system-critical partitions.

Step 8: Confirm the Partition Was Deleted

Run:

list partition

The deleted partition should no longer appear, and its space should become unallocated.

You can also check:

list disk

The available space should reflect the deleted partition.

Step 9: Create a New Partition

To use the unallocated space, create a new primary partition:

create partition primary

By default, this uses the available unallocated space.

If you want to create a partition of a specific size, specify the size in MB. For example, to create a 100 GB partition:

create partition primary size=102400

ALSO READ How to Download Documents From DigiLocker Online

Step 10: Select the New Partition

If necessary, list the partitions:

list partition

Then select the newly created partition:

select partition 1

Replace 1 with the correct partition number shown on your system.

Step 11: Format the New Partition

For an NTFS partition, use:

format fs=ntfs quick

The quick option performs a quick format.

You can also assign a drive letter:

assign letter=D

Replace D with an available drive letter.

Step 12: Verify the New Partition

Run:

list volume

You should now see the newly created volume, its file system and assigned drive letter.

You can also use:

exit

to leave DiskPart.

Then open File Explorer and check whether the new drive appears under This PC.

Complete Example

If you have confirmed that Disk 1, Partition 1 is the partition you want to remove, a typical sequence is:

diskpart
list disk
select disk 1
detail disk
list partition
select partition 1
detail partition
delete partition
create partition primary
format fs=ntfs quick
assign letter=D
list volume
exit

Do not blindly copy this sequence. The disk and partition numbers must be replaced with the numbers that match your computer.

How to Check a Drive or Partition Before Deleting It

If you’re unsure which partition you are looking at, use:

list disk

Then:

select disk 1
detail disk

Next:

list partition

Then:

select partition 1
detail partition

This verification step is especially important on systems containing multiple SSDs, HDDs, USB drives or recovery partitions.

Important DiskPart Commands

CommandPurpose
list diskShows connected disks
select disk XSelects a disk
detail diskDisplays selected disk details
list partitionShows partitions
select partition XSelects a partition
detail partitionDisplays partition details
delete partitionDeletes the selected partition
create partition primaryCreates a primary partition
format fs=ntfs quickQuickly formats the partition as NTFS
assign letter=XAssigns a drive letter
list volumeDisplays available volumes
exitExits DiskPart

What If the Partition Cannot Be Deleted?

If DiskPart displays a message indicating that the partition is protected, first verify that you selected the correct partition.

You can then use:

delete partition override

However, do not use override simply to bypass an error. Some protected partitions are required for Windows to boot or recover the system.

How to Scan a Partition for Errors

If your goal is to troubleshoot a partition rather than delete it, you may want to scan the file system first.

Open Command Prompt as administrator and run:

chkdsk D: /scan

Replace D: with the drive letter you want to check.

For a more thorough repair operation, Windows may require additional CHKDSK options and, depending on the drive, a restart.

Final Safety Checklist

Before running delete partition, confirm:

  • Important files have been backed up.
  • You selected the correct disk.
  • You selected the correct partition.
  • The partition does not contain required Windows boot files.
  • You are not accidentally selecting an EFI or Recovery partition.
  • You have verified the disk size and partition size.
  • You understand that deletion can permanently destroy the partition’s data.

Conclusion

Using DiskPart in Windows 11 is a powerful way to delete and recreate partitions without relying on the graphical Disk Management utility. The process is straightforward: identify the correct disk, verify the target partition, delete it, create a new partition, format it and assign a drive letter.

The most important step is verification before deletion. A wrong select disk or delete partition command can result in permanent data loss.

Manoj M

Manoj M is the founder and Editor of TopTrendingTech.com. B.E graduate with a passion for technology, he writes about smartphones, gadgets, AI tools, and step-by-step tech guides to help readers across India make informed decisions. He has authored over 100 articles focused on delivering accurate, easy-to-understand tech content.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button