I often run into situations where I need to remove all the partitions from a USB stick or a hard drive. This is some reminders for myself on how to do that on both Windows and Macintosh.
NOTE: This is for information purposes ONLY. If you follow these instructions, you will lose the data on the drive you are working with. I take no responsibility for this - it is all on YOU. You have been warned.
WINDOWS
Open an administrative command prompt or PowerShell:
diskpart
list drives
sel drive {drive number} (ie: sel drive 1)
list part
sel part {partition number} (ie: sel part 2)
del part override
Repeat the selecting and deleting of partitions as required until all partitions are removed.
MACINTOSH
Open a terminal window:
diskutil list | more (lists your physical disks and partitions - figure out which one you are looking to work with ie: /dev/disk1)
diskutil umountDisk /dev/disk{disk number} (ie: diskutil umountDisk /dev/disk1)
gpt destroy /dev/disk{disk number} (ie: gpt destroy /dev/disk1)
This will remove all the partitions and volumes on the disk.