User Tools

Site Tools


windows:diskpart_cleanusb

This is an old revision of the document!


Diskpart clean USB drive

Sometimes I use USB to install non-windows stuff and then I may write image directly to USB with Etcher tool etc. These images may contain multiple partitions and returning USB back to single volume fat drive can be tricky. Windows has inbuilt tool called diskpart which usually can be used to clean USB disk and recover it back to single partition mode.

Open Command Prompt/Powershell as admin, run command diskpart (do not insert USB yet), then in diskpart:

DISKPART> automount disable (Disables automount of disks)

Insert USB disk

Find and select correct disk, failure in this step may end you deleting your harddrive. Disk size is way to identify correct disk:

**DISKPART> list disk \\  \\ Disk ### Status Size Free Dyn Gpt \\ -------- ------------- ------- ------- --- --- \\ Disk 0 Online 931 GB 2048 KB * \\ Disk 1 Online 7452 GB 1024 KB * \\ Disk 2 Online 1907 GB 0 B * \\ Disk 3 Online 14 GB 2861 MB**

**DISKPART> select disk 3 \\  \\ Disk 3 is now the selected disk.**

**DISKPART> list disk \\  \\ Disk ### Status Size Free Dyn Gpt \\ -------- ------------- ------- ------- --- --- \\ Disk 0 Online 931 GB 2048 KB * \\ Disk 1 Online 7452 GB 1024 KB * \\ Disk 2 Online 1907 GB 0 B * \\ * Disk 3 Online 14 GB 2861 MB**
windows/diskpart_cleanusb.1628697002.txt.gz · Last modified: 2021/08/11 18:50 by admintomi