Quick fix: diskpart’s clean fails on write-protected USB sticks because the protection is at the hardware level. Check for a physical write-protect switch on the USB stick. If none, the protection is firmware-level — use the manufacturer’s low-level format utility or accept that the stick is dead.
You insert a USB stick. Try to write to it — access denied. Open elevated diskpart and run clean — reports “The media is write protected.” Disk Management shows the stick as RAW or unusable. No physical write-protect switch on the device. Diskpart can’t fix what hardware enforces.
Affects: Windows 11 with write-protected USB sticks.
Fix time: 15 minutes.
Where write protection comes from
USB stick write protection can be: a physical switch on the device, a registry policy on the PC (StorageDevicePolicies WriteProtect = 1), a firmware-level lock set by some manufacturers, or hardware failure that puts the controller into read-only mode. Each requires a different fix.
Method 1: Check for physical write protection
- Inspect the USB stick for a small slider switch on the side. If present, toggle it to the unlocked position.
- Some SD cards have a similar switch; verify it’s in write mode.
- Reinsert and retry diskpart clean.
Method 2: Remove registry write protection
- Open regedit.
- Navigate to
HKLM\System\CurrentControlSet\Control\StorageDevicePolicies. - If the key exists, set WriteProtect =
0. If not, no registry-level protection is active. - Reboot.
- Retry diskpart.
Method 3: Use manufacturer’s low-level format tool
- Identify USB stick manufacturer (often via VID/PID; tools like Chipgenius show this).
- Visit the manufacturer’s site for their format/repair utility (SanDisk MFT, ChipsBank, Phison).
- Run the tool with the USB inserted.
- It performs a low-level format that can reset write-protection flags in firmware.
Verification
- diskpart clean completes successfully.
- You can format the USB and copy files.
If none of these work
If hardware-level write protection persists despite all software methods, the USB stick’s controller has entered a read-only failure mode — the stick is dead and can only be read. Cheap USB sticks reach this state after years of writes; the controller flips to read-only to preserve existing data. Recovery: copy data off (if possible) and dispose. Replace with a new stick.
Bottom line: Software-level write protection has fixes (physical switch, registry, manufacturer tool). Hardware-level write protection means the stick is at end-of-life.