How to delete USB drive partitions tutorial

Last Updated on September 19, 2016

I have a USB drive which I use for transferring files between my computers in the home. A few days ago, I used Ubuntu’s Disk utility to make a bootable USB stick for installing Ubuntu in a few systems. Ubuntu installed fine on every PC that I tried.delete-pen-drive-partitions

Everything went fine until I inserted the USB drive into my Windows PC.

Out of the 32Ggigs, the USB drive was showing up as a single 4GB logical partition in “My PC”. I checked the Disk Management in Windows to see if the drive was screwed for good or not. Turns out that it was partitioned into 4 pieces by the Ubuntu disk utility. When I tried to format the drive using the normal right-click > Format method, I got the error that “Windows was unable to complete the format.”

So, the USB drive was now a meager 4GB along with no option to change its state. Initially, I thought that it was gone for good. However, upon digging deeper into Windows Diskpart, I was able to recover the drive easily.

The problem with the drive was that Ubuntu’s disk utility had split the drive into 3 logical partitions. This method was obscure to Windows, so the formatting was not possible. Here’s how I fixed it.

Delete partitions from a USB/pen drive with diskpart

  • Insert the USB drive into one of the ports on your PC and wait for it to show up in This PC/ My Computer.
  • Press Windows key and search for cmd. Select the Command Prompt from the results. Right-click on command prompt and select “Run as administrator“.
  • In the cmd window, type diskpart. The diskpart is a utility in which allows you to manage disks and their partitions in Windows.
  • Type list disk. This will show all the drives connected to your PC. In my case, it is Disk 2 of size 30GB.
  • Now type select disk X. Here X is the number which your USB drive has been assigned by diskpart. In my PC, it is 2. So, I will have to type select disk 2 as shown in the image below.
  • Type clean to clear the partition data from the selected drive. The clean command will remove all the currently present partitions in the drive without you worrying about each of them. Alternatively, you can also use the list, select and delete partition commands to delete the partitions one by one.
  • All the data from the drive is now removed and there are no formatted partitions in it. In order to use it for storage, you need to create partitions. For this, type create partition primary and press enter. This command will create a single partition on the USB drive using all the available storage.
  • Now, we need to assign this partition as the primary one. For this, type select partition 1 and press enter.
  • Type active to make this partition the default.
  • Use the format fs=ntfs quick command to quick format the drive.
  • Lastly, type assign to allow Windows to give the drive a single letter name for listing it in “This PC”/My Computer.
  • Type exit to exit the diskpart utility.

Close everything and press Windows key + E to open “This PC”/”My computer”. You will now see the full sized USB drive on your PC.

Photo of author

Written by Utkarsh

Utkarsh Bhatt is a certified tech expert and software engineer for a Fortune 500 Company. He was born in 1995, making him one of the oldest members of the team at EFX. Utkarsh loves solving technical issues and is always the first to jump on any problem that needs solving. When he’s not coding or debugging, he enjoys playing video games (especially Super Smash Bros.) and watching cartoons.

Share on:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.