Before you erase anything
This guide returns a USB flash drive to ordinary file storage. Do not use it on your Windows system disk, an external Windows installation, or recovery media you still need.
Prepare the following:
- A verified backup: Copy wanted files to a different physical drive and check that they open. If files have disappeared and you need them back, stop before deleting, cleaning, or formatting anything.
- Administrator access: DiskPart requires administrative permissions.
- An identifiable USB drive: Disconnect other removable storage where practical to reduce the risk of selecting the wrong disk.
- Time for verification: The partition reset is usually brief, but backing up and testing files can take longer than the suggested 15 minutes. Microsoft distinguishes a quick format from a complete overwrite; a quick format is not a thorough media test.
Choose the intended file system before starting:
| Intended use | Suitable choice |
|---|---|
| General file transfers between Windows and other compatible systems | exFAT |
| Windows-focused storage | NTFS |
| A device that specifically requires FAT32 | FAT32, subject to that device’s requirements |
Check the receiving device’s documentation rather than assuming a television, car stereo, or firmware updater accepts exFAT. FAT32 also has an individual-file limit of just under 4 GiB: a large file being rejected does not necessarily mean the USB has lost capacity. Kingston documents exFAT as an alternative for this file-size problem.
1. Check whether the missing space is outside the visible volume
- Connect the affected USB.
- Right-click Start and select Disk Management. Alternatively, press Windows + R, enter
diskmgmt.msc, and select OK. - Find the USB in the lower, graphical disk view. Compare the capacity shown beside its Disk number with the sizes of the partition blocks to its right.
- Record the disk number, total size, existing drive letter, and partition layout.
Microsoft documents the same Disk Management interface for Windows 10 and Windows 11, so separate Settings paths are not needed here.
Use the result to decide what to do next:
- Expected whole-disk size, small visible partition, substantial unallocated space: The space is available to partition, but not part of the visible volume.
- Expected whole-disk size, several partitions: A bootable-media layout may be occupying the drive. A full reset is appropriate only if you no longer need any of those partitions.
- One full-size volume: Repartitioning is unlikely to address the complaint. Check whether you are comparing total capacity with free space, or encountering a file-size restriction.
- Whole disk itself is drastically undersized, absent, or unusable: Do not assume this is a partition problem. Start with the hardware checks in the troubleshooting section rather than erasing it. Microsoft’s troubleshooting guidance distinguishes missing or failing disks from usable disks that merely need a volume or drive letter.
A small difference from the advertised capacity is normal: Kingston notes that formatting and device functions consume some listed flash capacity. This is different from finding a large unallocated area alongside a tiny partition. The goal is to use the capacity Windows detects, not force the formatted volume to match the number printed on the packaging.
Do not simply format the small drive letter yet. Formatting an existing volume recreates its file system; creating a larger partition is a separate operation. Reformatting the same small volume therefore does not incorporate space outside it.
2. Select and verify the USB in DiskPart
Use DiskPart when you intend to discard the entire old layout, including boot-media partitions. Its clean command operates on the selected disk, not merely the drive letter you can see in File Explorer.
- Open Start, type Command Prompt, right-click the result, and select Run as administrator. Approve the elevation prompt.
- Enter:
diskpart
- At the
DISKPART>prompt, enter:
list disk
- Find the USB using the disk number and capacity recorded earlier. The Size column is the disk size; DiskPart’s free-space information concerns space available for partitioning, not free space inside an existing file system.
- Select the correct disk, replacing
Nwith its actual number:
select disk N
Do not type N literally, and do not copy a disk number from another computer or tutorial.
- Inspect it:
detail disk
list partition
detail disk displays properties and volumes belonging to the selected disk; list partition displays its partition layout. Compare these with your USB’s known details. If anything points to your Windows disk or another storage device, stop.
Safety checkpoint: Capacity alone may not distinguish two identical-size disks. Do not continue until you can confidently identify the USB. If you disconnect or reconnect storage while checking, run list disk again and reselect the target rather than relying on a previously recorded number.
3. Remove the old layout and create a full-size partition
Warning: The next command removes every partition from the selected disk. There is no built-in undo. Confirm the backup and disk identity before proceeding. If you selected the wrong disk, stop without entering clean. Microsoft documents that clean removes the selected disk’s partition or volume-formatting information.
- With the verified USB still selected, enter:
clean
Wait for DiskPart to report success. If it reports an error, stop and use the relevant troubleshooting section below.
- Create the replacement partition:
create partition primary
Do not add a size= value. Microsoft specifies that omitting it makes the partition occupy the available space in the current unallocated region. DiskPart automatically moves focus to the new partition.
- Exit DiskPart:
exit
- Return to Disk Management and locate the USB again. You should now have a newly created partition rather than the previous boot-media layout. The next step is to format that partition and give it a usable drive letter. Microsoft treats partition creation, formatting, and drive-letter assignment as distinct storage-management operations.
Do not substitute clean all. Microsoft documents that it zeroes every sector, whereas ordinary clean removes the partition information needed for this reset. Overwriting the entire device is unnecessary for reclaiming unallocated space.
4. Format the new volume and assign a drive letter
Warning: Formatting destroys existing data in the selected volume. At this point the intended target is the newly created USB partition—not any neighboring disk. Recheck its identity before confirming.
- In Disk Management, right-click the new USB volume and select Format.
- Enter a recognizable Volume label, such as
USB. - Select exFAT or NTFS, according to the compatibility decision made earlier.
- Leave Allocation unit size at its default.
- For an otherwise healthy USB that only had an unwanted partition layout, select Perform a quick format.
- Select OK, confirm the warning, and wait until formatting finishes. A quick format creates the file-system structures without scanning every sector for bad areas; do not interpret completion as proof that every part of the flash memory works.
- If the formatted volume has no drive letter, right-click it and select Change Drive Letter and Paths.
- Select Add, choose Assign the following drive letter, select an unused letter, and select OK. Confirm if prompted. Do not change letters on unrelated volumes.
There is no scheduled Windows restart in this procedure. Finish formatting and verification before disconnecting the USB.
If the USB was already completely unallocated
You can skip DiskPart when the correct USB already consists entirely of unallocated space and there are no files or partitions to preserve.
Creating and formatting a replacement volume is not a file-recovery method. Do not proceed if the unallocated state appeared unexpectedly and you need the previous contents.
- Right-click the USB’s Unallocated area in Disk Management.
- Select New Simple Volume, then Next.
- Accept the maximum default volume size.
- Assign an available drive letter.
- Choose the file system and formatting options.
- Review the selection and select Finish.
This is Microsoft’s documented graphical method for creating a volume from unallocated space.
5. Verify that the capacity has been restored
Check both the layout and everyday usability:
- Inspect Disk Management. Confirm that the USB now has a large data volume rather than the original small partition plus a substantial unused region.
- Inspect the formatted volume. Open File Explorer > This PC, right-click the USB, and select Properties. Compare its total capacity with the whole-disk size, not just with the printed capacity.
- Test actual files. Copy a few expendable files onto the USB, open them from it, and confirm that they contain the expected data.
- Check persistence. Close the files, safely eject the USB, reconnect it, and open the copied files again.
These are practical checks, not a certification of the drive’s entire physical capacity. A successful quick format and a small copy test do not test every storage location. If important data will live on this drive, keep another copy elsewhere.
Troubleshoot errors without repeatedly erasing the drive
DiskPart reports that the media is write-protected
First check for a physical write-protection switch, if the device has one. Kingston also documents write protection as a possible failure condition on its flash drives; formatting is not a universal cure.
To inspect the Windows disk attribute, reopen elevated DiskPart, identify and select the USB again, then enter:
attributes disk
Only clear protection on a device you own or are authorized to modify. Clearing the attribute permits writes; it does not recover data or bypass a hardware fault.
If the selected disk’s read-only attribute needs clearing, enter:
attributes disk clear readonly
attributes disk
Microsoft documents both setting and clearing this attribute. To restore that software protection later, reselect the correct disk and use:
attributes disk set readonly
If the drive remains write-protected, stop repeating clean. Contact the device manufacturer or, for managed equipment, your IT administrator.
The USB is missing, reports no usable capacity, or produces I/O errors
Do not keep trying destructive commands. Microsoft recommends checking the connection, trying a different USB port, connecting directly rather than through a hub, and testing on another computer when troubleshooting an undetected or failing disk.
If the same problem persists across those checks, record the exact error and the capacity shown in Disk Management. Escalate to the manufacturer. If the files matter more than the device, stop writing to it and seek recovery assistance before further formatting.
The full-size volume exists, but File Explorer does not show it
Check for a missing drive letter. Use Change Drive Letter and Paths > Add on the formatted data volume. If that option is unavailable, Microsoft notes that the volume may not be ready for a letter—for example, because it is unallocated or is a special EFI or recovery partition. Do not assign letters to unrelated system partitions.
The drive is full-size, but a large file still will not copy
Check the file system. FAT32 cannot store an individual file of 4 GiB or larger, regardless of free space. Back up the contents before reformatting as exFAT or NTFS, and check compatibility with the device that will read the USB. Partition cleaning is unnecessary for this particular problem.
Recovery if you selected the wrong disk
There is no DiskPart rollback command for clean. If you realize the wrong disk was selected, stop immediately: do not create a partition, format it, or copy files onto it. Microsoft’s documentation distinguishes partition-metadata removal by clean from the complete sector overwrite performed by clean all; neither should be treated as safely reversible.
Restore from a verified backup where available. Without one, obtain recovery assistance before making further changes. If the correct USB was reset successfully, restore your backed-up files and open several from the USB to verify the restored copies before deleting any backup.