Free USB Flash Drive Space after ISO image saved

Some time ago I wrote about installing Ubuntu from USB flash drive. But when you burn an ISO image to USB stick it re-formats partition table. and suddenly you realize that you don’t have enough free space on USB drive. Even formatting doesn’t help. Other possible scenarios to loss space is to install some recovery software, to install some live Ubuntu (or other Linux) distribution or for example to use Dell Diagnostic tool or any other PC makers diagnostic tools that write bootable image to USB flash drives. Also even some other tools that write to USB can change partition table and then disk losses it space. After that Windows and Linux can see only master DOS partition winch usually has not to much space.

So after installing Ubuntu I put the USB drive into my Windows machine and realized that I don’t have free space. It is 4G USB and there where only 2M free. I select it, click right mouse on it and select Format. But as I said before this simply didn’t help.

Free space of my USB that I used to install Ubuntu from it:
USB Flash Drive Show Free Space Windows

Here is the picture showing possible format options (also not helpful):
Format USB Drive No Free Space

I started searching for the solution of the problem. And there were suggestion to try to right click on My Computer or just Computer in File Explorer and select Manage. And then from Windows that opens to select Storage -> Disk Management

USB Flash Drive Windows File Explorer

You can see from this image partitions of USB drive. A you see it has nearly 4G but there are two unallocated partitions and only one small partition that is allocated and is available.

USB Stick Shows Partitions Info

That looks good except that Windows Disk Management utility allows you to change partitions of Hard Drive but not on USB flash drive. And it is really bad. So you can change partitions of Hard Drive, but you cannot do anything with removable USB flash drive.

USB Flash Disk Management Utility Available Options

Windows Hard Drive Management

Fortunately there are command line tool called diskpart which can be used to manage partitions of any attached disks. To start it just click on Windows Start Menu and type diskpart.

Disk Part USB and Hard Drive tool

Here are the steps that you need to run in order to free unused free space from USB drive. First step is to list installed drives. So type the following command:

DISKPART> list disk

And then you will see something like that.

List Available USB Flash Drives

What you see is installed physical disks to your computer. It doesn’t matter whatever it is hard drive or USB. So look into your output and decide which one is your USB drive. Then you need to select it. In my case it is number 1. So you have to execute the following command.

DISKPART> select disk 1

When the USB mountable stick is selected then you need to clean it and to create brand new primary partition. To do that just execute next two commands

DISKPART> clean
DISKPART> create partition primary

Then you need to exit from the diskpart tool by typing exit command.

Here is the full list of commands pun in text and picture.

USB Free Space Command Line Tool

DISKPART> list disk
DISKPART> select disk 1
DISKPART> clean
DISKPART> create partition primary
DISKPART> exit

After that you need to format the USB drive. But note that it is not in the list with drives. You have to go to Computer section from File Explorer and then you will see it in the right panel.

Format USB Flash Drive Dialog

And on the final step you can see that USB stick has all of its space free and just after format it will be available for use.

Format USB stick final step

Related Posts Plugin for WordPress, Blogger...

  • ArrozConCostra

    Have the same problem as you and thanks for the hint, but does not work for me. I used rufus to put a ubuntu 16 image onto an usb, but the diskpart can’t kill it … Its giving out an Error

  • ArrozConCostra

    actually..it kind of worked … after I got the error, I opened again disk partition manager in windows, then I was able to create a new volume and format it to primary fat32 !