Diskpart Clean Not Working
DiskPart is an inbuilt command-line hard drive partitioning program in Windows.
It allows you to partition internal or external hard drives and format removable storage devices like USB drives.
How To Fix DiskPart Clean Not Working on Windows 10/11?
![]()
Unplug the USB drive or SD card from your PC.
As for a hard drive, reinstall it via a power cable and a SATA cable.
Reconnect the gadget to your gear.

Step 3. sign in to your box as an administrator.
If you still cannot load the Clean command in DiskPart, yo move to the next solution.
Connect the target rig to your rig.

PressWin+Ealtogether to launchFile Explorer.
You may receive two error messages:the media is write-protectedorData error .
Navigate to the following path:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.

In the right pane, find thewrite Protectionkey and double-click it to change itsvalueto0.
If so, take the steps below to clear this state:
Step 1.
Connect this machine to your system.

Typecmdin thesearch barto locateCommand Promptand hit it.
In the command window, typediskpartand hitEnter.
Step 4. typelist diskand hitEnterto show all the disks on your box.

Typeselect disk #and hitEnter.
(#should be the actual disk number of your read-only unit.)
Here, we take removing read-only for volumes ondisk 1as an example, so we typeselect disk 1and hitEnter.
![]()
Typeattributes disk clear readonlyand hitEnter.
RunCommand Promptas an administrator.
Tip: Do you know what the differences among SFC, DISM, CHKDSK, and ScanDisk are?

Prepare aWindows installation disk, insert it into your rig and boot from it.
PressRepair your machine>Troubleshoot>Advanced Options>Command Prompt.
Step 3. initiate the following commands one by one to erase the disk.

Dont forget to hitEnterafter each command.
Diskpart clean vs clean all: which one to select?
To make a wise choice, learn the difference first.
![]()
When they fail, try using MiniTool Partition Wizard.
Therefore, it is advisable to use a more user-friendly disk-wiping solution MiniTool PartitionWizard.
Even if you are a computer beginner, you might erase your disk easily with just a few clicks.

Heres how to do that:
Step 1.
Launch the program and go for the disk that you should probably wipe from the right pane.
Just choose one and hitOK.
Tip:
Step 3.
Now, you will see a preview page in which the selected disk becomes unallocated.
Finally, hitApplyto perform the changes.
MiniTool Partition Wizard can wipe a computer easily but keeps OS.
At the same time, wiping the disk will erase all the data on your rig.
Now, create a file backup with us:
Step 1.
Download, install and launch this program.
nudge the following button to get a 30-day free trial.
MiniTool ShadowMaker TrialClick to Download100%Clean & Safe
Step 2.
Click onKeep Trialand then go to theBackuppage.
Go toSOURCE>Folders and Filesto select a backup source.
After making your decision, hitOKto return to theBackuppage.
InDESTINATION, choose a storage path for your backup.
HitBack Up Nowto start the backup task right away.
The last solution is preferred by most people.
Besides, we also sincerely advise you to back up your important files before wiping the target disk.
Do you have other ideas about this issue or our service?
Leave your comment below or contact us via[email protected].