How to Repair a Damaged USB Drive Using DiskPart

A damaged USB drive can be frustrating, especially when you need to access or store important data. Fortunately, Windows provides a powerful tool called DiskPart that can help you repair and restore your USB drive to working condition. This guide will walk you through the steps to use DiskPart for repairing your USB drive.


Insert the damaged USB drive into an available USB port on your computer. Wait for Windows to recognize the device.


Click on the Start menu.

Type cmd in the search bar.

Right-click on Command Prompt and select Run as administrator.


In the Command Prompt window, type the following command and press Enter:

diskpart

This will launch the DiskPart utility.


To view all the disks connected to your system, type:

list disk

A list of disks will appear. Each disk will have an associated number (e.g., Disk 0, Disk 1).


Look for the disk that matches the size of your USB drive. Be very careful to select the correct disk to avoid data loss on other drives.


Type the following command, replacing X with the disk number of your USB drive:

select disk X

For example, if your USB drive is Disk 1:

select disk 1


This command will erase all data and partitions on the selected disk:

clean


create partition primary


You can format the USB drive to NTFS or FAT32 file systems. For a quick format in NTFS, type:

format fs=ntfs quick

For FAT32, use:

format fs=fat32 quick


assign

This will assign the next available drive letter to your USB drive.


Type the following command to exit:

exit

Comments