Removing partitions from a USB thumb drive

diskpartSo… a while back I was playing around with Linux and needed a bootable install disc. I decided to make one of my spare USB thumb drives into one. All went well, and I successfully installed Ubuntu Server on my machine. Great.

Fast forward to this morning when I needed said thumb drive to transfer some pretty hefty files. Low and behold, my 4GB thumb drive was being read as a 2MB thumb drive. No problem… just format the thing, right? Uh… no. Apparently not.

To create the install disk, I used a nice little program called Image Writer for Windows It worked great, but unfortunately it partitioned my thumb drive, and Windows 7, for some reason, couldn’t get rid of the partitions when I tried to format it. Bleh. Thankfully, Google is always there when I need it.

It turns out there’s utility in Windows 7 (and probably other Windows versions as well, but I’m using 7) called Diskpart that will fix this problem right up for you. Here’s how to use it to format a USB drive.

  1. Bring up the command prompt. Easiest way is to go to the Start menu and type in “cmd” in the search box and hit enter.
  2. In the command prompt window, type “diskpart”. That will launch another window with a DISKPART> prompt.
  3. Type “list disk” to find out which disk your USB drive is. It should be pretty obvious from the size of the disk. If it’s not, alternatively, you can search “Computer Management” under the Start menu, and then click on “Disk Management”. You should see something that says “Disk 1 Removeable” or something similar.
  4. Once you know which disk you want, in the Diskpart window, type “select disk 1” (or whatever number your thumb drive happens to be assigned to). Diskpart should tell you that this is now the selected disk,
  5. Type “clean”. This will get rid of all the old information on the disk, as well as any partitions. Diskpart will tell you when this has succeeded.
  6. Type “create partition primary”. This sets up the new partition (one big one instead of a small one) for the drive.
  7. Type “select partition 1” to select the partition you just created.
  8. Type “active” to mark the selected partition as active.
  9. Type “format fs=ntfs quick” to format the drive. This may take a few minutes depending on the size of the drive.
  10. Type “assign”.
  11. Type “exit” to leave the Diskpart program.

Now remove the thumb drive from the USB port, and then plug it back in. It should come up at its original size. Ta-da!

Just as a word of caution, Diskpart doesn’t seem to have any confirmation prompts built into it. So BE CAREFUL which drive you’re telling it to use, or you might end up formatting something that shouldn’t be formatted.

Tags: , ,

170 Comments to "Removing partitions from a USB thumb drive"

  1. Aakash Deshmukh says:

    my flash drive is still nit showing its space and asking for format

  2. Aakash Deshmukh says:

    after format it worked thanks a lot u r a genius

  3. Anonymous says:

    um i am getting an error message:DiskPart has encountered an error: Access is denied.
    See the System Event Log for more information.

  4. rani says:

    thanks bro, good job !!!

  5. funchapter says:

    Superb. thank you

  6. Mark says:

    Thank you so much. That worked perfectly!

  7. cm Vasanth says:

    Thank you very much

  8. Alan Buxton says:

    Excellent, many thanks for posting this solution. Resolved an issue created by a phone creating 1 large and 1 tiny partition on a 64GB SD card

  9. Tom says:

    Life saver

  10. Greg says:

    Fanstastic, thank you very much. It worked fine for me at the first attempt.

  11. Ray says:

    Amazing! Thanks for this, saved me a couple hours of frustration, undoubtedly.

  12. Clive says:

    Thanks I was in the same situation as you with Linux install on USB stick. Instructions clear to follow also win 10

  13. nawaf says:

    thank you boss
    excellent yo r simply gr8

  14. Chris says:

    Thanks! I thought I was losing my mind until I found your steps!

  15. Shai says:

    thank you!

  16. Tufail says:

    Million thanks!!!! GOD Bless u 🙂

  17. Christian Buysschaert says:

    From Belgium, it worked as you indicated… okay I had a bad micro USB to USB converter first (that is what I myself found), but your instructions worked. Sometimes you have to say ‘thank you’ when your day is again perfect.

  18. Kaushal says:

    u r the best…….:-)

  19. Amar says:

    after press clean it’s showing ->Disk part has encountered error : An attempt was made to move the file pointer see the system event log for more information.
    Please help me my 32 GB memory card showing only 128 KB size

  20. geo says:

    works real good nice article.

  21. Josu. says:

    Thank you. Just perfect! You are a genius!

  22. Ameya Dahale says:

    I was frustrated. This made my day. Thanks a lot!!!

  23. Jagannath Patra says:

    thank you very much. it was so easy.

  24. Krishna says:

    Excellent, Worked flawlessly on flash drive and SD card. Was about to throw away them and this helped for reusing them.

  25. hamza says:

    thank yuo dear

  26. Jane says:

    Fantastic advice! The only problem I encountered was when I typed “clean”, it said I didn’t have access. I researched and found out I had to use “command prompt” as “admin”. After that it was easy sailing.

  27. Rafael Sason says:

    Amazing!!!
    It worked perfect…
    Thanks

  28. Pierre says:

    great!! thanks a lot

  29. buza says:

    Thank you! worked great (win10 pro). I tried formatting my storage device through disk management but it wouldn’t let me delete the partitions. But your method worked great.

  30. Jack Jones says:

    Thanks, lovely simple guide, jack

Leave a Reply

Your email address will not be published. Required fields are marked *

Nikki Blight – Web/PHP Developer