How to remove unallocated space?
- First of all run Windows command line and type diskpart in the command prompt.
- Windows will ask you for Administrator permissions to run the tool.
- Then run list disk command to find your USB flash disk’s number. It should be the same as disk’s number in Computer Management tool. It was I in my case.
- Next you should chose the disk to work with. Type select disk <disk number> command, e.g.select disk I.
- The next step is to clean all volumes and partitions on the disk. Use clean command to do that. The last step is to create a primary partition.
- You can do that using create partition primary command. That’s all. You should be able to format your flash disk now.
This is how I removed unallocated space on my machine:
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk C Online 298 GB 0 B
-------- ------------- ------- ------- --- ---
Disk C Online 298 GB 0 B
Disk D Online 298 GB 0 B
Disk E Online 298 GB 0 B
Disk I Online 7509 MB 6619 MB
DISKPART> select disk I
Disk 1 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> exit