To low-level format and repartition an external SSD or HDD using diskpart, follow these steps to wipe the drive and remove the write protection:
-
Open Command Prompt as Administrator:
- Press
Win + S, typecmd, right-click “Command Prompt,” and select “Run as administrator.”
- Press
-
Run diskpart:
- Type
diskpartand press Enter.
- Type
-
List disks:
- Type
list diskand press Enter. Identify your SSD (e.g., Disk 1).
- Type
-
Select the SSD:
- Type
select disk X(replace X with the disk number of your SSD, e.g.,select disk 1) and press Enter.
- Type
-
Remove write protection:
- Type
attributes disk clear readonlyand press Enter.
- Type
-
Wipe the drive:
- Type
cleanand press Enter. This removes all partitions and data, freeing the full drive.
- Type
-
Create a new partition:
- Type
create partition primaryand press Enter. - Type
format fs=ntfs quickand press Enter to format as NTFS. - Type
assignand press Enter to assign a drive letter.
- Type
-
Exit diskpart:
- Type
exitand press Enter.
- Type
The SSD is now wiped, formatted, and ready for use. You can verify it in Disk Management or File Explorer.

