taken from https://www.pendrivelinux.com/restoring-your-usb-key-partition/
Open a command Prompt as administrator (cmd.exe).
Type Diskpart
then press enter.
Next type List Disk
then press enter.
Type Select Disk X
(where X is the disk number of your USB drive) then press enter.
Then type Clean
and press enter.
Next type Create Partition Primary
then press enter.
Type Format fs=Fat32 Quick
then press enter (You can also use NTFS or exFAT).
Then type Active
and press enter.
Finally, type Exit
then press enter to Quit.