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
diskpartutility 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.

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
- Press Windows + S.
- Search for Command Prompt.
- Right-click Command Prompt.
- Select Run as administrator.
- 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:
diskpartPress 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 diskDiskPart will display the available drives.
For example:
Disk ### Status Size
-------- ------------- -------
Disk 0 Online 476 GB
Disk 1 Online 931 GBDo 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 1Then verify your selection:
detail diskCheck the disk information carefully before continuing.
Step 5: List the Partitions
Now display the partitions on the selected disk:
list partitionYou may see something similar to:
Partition ### Type Size
------------- ---------- -------
Partition 1 Primary 500 GB
Partition 2 Recovery 1000 MBIdentify the partition you want to remove.
Step 6: Select the Target Partition
For example, to select Partition 1:
select partition 1Then verify it:
detail partitionMake absolutely sure this is the partition you want to delete.
Step 7: Delete the Partition
For a normal data partition, you can use:
delete partitionIf DiskPart refuses to delete the partition because it is protected, you may see an error. The override option can force deletion:
delete partition overrideUse 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 partitionThe deleted partition should no longer appear, and its space should become unallocated.
You can also check:
list diskThe 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 primaryBy 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=102400ALSO READ How to Download Documents From DigiLocker Online
Step 10: Select the New Partition
If necessary, list the partitions:
list partitionThen select the newly created partition:
select partition 1Replace 1 with the correct partition number shown on your system.
Step 11: Format the New Partition
For an NTFS partition, use:
format fs=ntfs quickThe quick option performs a quick format.
You can also assign a drive letter:
assign letter=DReplace D with an available drive letter.
Step 12: Verify the New Partition
Run:
list volumeYou should now see the newly created volume, its file system and assigned drive letter.
You can also use:
exitto 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
exitDo 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 diskThen:
select disk 1
detail diskNext:
list partitionThen:
select partition 1
detail partitionThis verification step is especially important on systems containing multiple SSDs, HDDs, USB drives or recovery partitions.
Important DiskPart Commands
| Command | Purpose |
|---|---|
list disk | Shows connected disks |
select disk X | Selects a disk |
detail disk | Displays selected disk details |
list partition | Shows partitions |
select partition X | Selects a partition |
detail partition | Displays partition details |
delete partition | Deletes the selected partition |
create partition primary | Creates a primary partition |
format fs=ntfs quick | Quickly formats the partition as NTFS |
assign letter=X | Assigns a drive letter |
list volume | Displays available volumes |
exit | Exits 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 overrideHowever, 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: /scanReplace 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.





