Written by
Yuri ZhangSummary: This article pinpoints how to use the delete partition/ clean command to delete all partitions in Diskpart. To spare risk and effort, use iBoysoft DiskGeeker to wipe all partitions precisely and quickly.
Ever feel like your hard drive is a cluttered attic full of forgotten boxes and broken furniture? Sometimes, the best way to start fresh is to clear it all out.
If your disk is packed with messy partitions—leftovers from old systems, failed installs, or half-used volumes, it's time for a clean slate. Let's explore how to safely delete every partition using diskpart.
Note: A mistake here could wipe out critical system or recovery functionality. While battling with diskpart, sharp but risky, iBoysoft DiskGeeker offers the same power with a safer, smarter touch. Its Secure Data Wipe makes erasing effortless, no stress, no guesswork.
How to delete partitions in diskpart
Let's learn how to remove partitions using diskpart, including how to deal with protected or hidden ones. This is useful when cleaning factory-installed bloatware partitions or reconfiguring a used disk.
Method 1. Normal partition deletion (one by one)
If you're dealing with a regular, unprotected partition like a typical data partition, you can delete it using the basic cmd:
- Open Command Prompt as Administrator, then type diskpart and press Enter to launch diskpart:diskpart
- To list all disks to find your target, run the command:list disk
- To select the target disk (replace X with your disk number), run:select disk X
- List partitions on that disk:list partition
- Select the partition you want to delete (replace 1 as needed), you need to select other partitions one by one if you want to delete them all:select partition 1
- Now run the normal deletion in diskpart:delete partition
Warm tips, if you are sure about your disk and partition number, just skip the listing part, use commands: (This works perfectly for standard partitions that aren't locked by the system or reserved for recovery.)select disk [number]
select partition [number]
delete partition
Tips: You can't paste all the commands and run them at once. Please copy and enter each command one by one, pressing Enter each time. Don't forget to change the number to your real drive letter.
Method 2. Forced deletion for protected partitions (one by one):
Some partitions are not so easy to remove. Windows protects them because they serve special purposes (like EFI system, OEM recovery, or MSR partitions). In such cases, you'll need to force the deletion:
- Use list partition to see all partitions.
- Use select partition for each one.
- Use delete partition override for protected ones.
In this method, listing and selecting each partition is still required. The override flag is crucial; it bypasses Windows' built-in protection and allows the removal of EFI System Partitions/ OEM Recovery Partitions /Microsoft Reserved (MSR) Partitions.
Warning: Be very careful when using override, as deleting these partitions can make a system unbootable if done on a system disk.
Share and continue to read simpler ways to delete all partitions.
How to erase everything in diskpart
The diskpart command supports secure wipes:
- clean: Deletes all partitions (fast, but recoverable).
- clean all: Writes zeroes to every sector — slow but very secure (unrecoverable).
Note: Both clean and clean all remove all partitions, but clean all goes further by wiping every bit of data. It's ideal before selling a drive or starting fresh. No need to list or select individual partitions in this method, just selecting the disk is enough.
Method 1. This is the fastest and most effective way to delete all partitions on a disk. Run the commands:diskpart
select disk X
clean
Method 2. Or, if you want to wipe everything:diskpart
select disk X
clean all
Want a safer and more visual way to wipe data?
If the command line feels too hazardous or abstract, iBoysoft DiskGeeker for Windows offers a powerful alternative, a user-friendly way to erase data beyond recovery. Its visual, step-by-step interface makes secure data wiping more accessible, especially for non-tech users, ensuring complete erasure without the risks of accidental miscommands. Share and view its tutorial as follows!
How to wipe all partitions with iBoysoft DiskGeeker
Whether you're wiping an entire disk, a single file, or just the free space, iBoysoft DiskGeeker securely shreds your private data using internationally certified methods, making it truly unrecoverable with clearer and more concise steps.
Step 1: Download and launch iBoysoft DiskGeeker.
Step 2: Click “Secure data wipe” in the app interface.
Step 3: Choose the target:
- Wipe Disk: Erases every sector of the entire disk.
- Wipe Partition: Erases only one partition, preserving others.
- Wipe Free Space: Erases remnants of deleted files without touching existing data.
You can select Wipe disk or Wipe partition.
Confirm the location to be wiped and click Next.
Step 4: Choose a wiping way tailored to your secrecy needs and click Next.
Step 5: Click Wipe and let the process complete.
You can also wipe or shred a specified file or folder in iBoysoft DiskGeeker:
Step 1. Open the Secure data wipe module and choose File shredder.
Step 2. Click the + button to add the file or folder you want to delete. Confirm by clicking Yes.
Step 3. (Optional) Check Clear indexes to also erase file name, location, and metadata.
Step 4. Click Shred and wait for the process to complete.
(Optional) Rebuilding the disk by creating a new partition
Creating a partition is the final piece in the lifecycle of disk setup. After wiping or deleting everything in Diskpart, it's time to rebuild:
create partition primary
format fs=ntfs quick
assign letter=G
These commands let you allocate unallocated space, choose a file system (NTFS, exFAT, etc.), and assign a usable drive letter such as G.
Related articles:
Format Any New Drive with DiskPart – Crystal-clear Win Guide
Mastering Command Line: How to Format C Drive Like A Pro
Can DiskPart Move Partitions: Correct Tools to Choose
Share these cherished tips and be a kind helper on the internet.