# diskpart

## Format and clean a USB drive
*Taken from [this great writeup](https://www.windowscentral.com/how-clean-and-format-storage-drive-using-diskpart-windows-10)*

Fire up diskpart and list active disks:
```
diskpart
list disk
```

Select the USB drive:
```
select disk X
```

Clean it:
```
clean
```

Create primary partition:
```
create partition primary
select partition 1
format fs=FAT32 label=CLEAN quick
```
!!!tip
If the drive is larger than 32GB you'll get a warning on the last step, saying the drive is too big.  In that case, you'll need to use exFAT (`format fs=exfat`):

```
format fs=exfat label=BITLOCKER quick
```
