The best way to do is...
sudo fdisk -l
This will list your all mounted/unmounted device..
Look for your USB device ... you can cross verify it by from Disk utility...It may list something like
/dev/sdb1 or /dev/sdc1...
sudo fdisk /dev/sdb --- if your USB is sdb
Command (m for help): d Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): d Selected partition 1 Partition 1 has been deleted.
Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
Now go back to Disk utility and then format the drive as you wish!...