I am referencing this question from another user:
Unable to format / erase hard drive
For some reason, this pesky Kingston drive I have does not want to erase on Disk Utility nor with the use of terminal commands. I have tried the method that this YouTube video explains.
This is the output from running two commands on terminal:
~ sudo diskutil eraseDisk JHFS+ noname /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Error: -69877: Couldn't open device
~ diskutil partitionDisk /dev/disk2 1 MBR FAT32 MYUSB R
Started partitioning on disk2
Unmounting disk
Creating the partition map
Error: -69877: Couldn't open device
(Is a disk in use by a storage system such as AppleRAID, CoreStorage, or APFS?)
Here is the information about the disk:
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.5 GB disk2
1: Windows_FAT_32 1821VPC 15.5 GB disk2s1