How can I format my USB? I tried before to make a bootable USB but it failed.  When I now try to format it normally I can't.  Trying this and that shows:

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *15.9 GB    disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Untitled                15.6 GB    disk2s2

MacBook: diskutil unmountDisk force /Volumes/Untitled
Forced unmount of all volumes on disk2 was successful
MacBook: diskutil eraseDisk JHFS+ Test /dev/disk2
Started erase on disk2
Unmounting disk
Creating the partition map
Error: -69877: Couldn't open device
MacBook:
Unplug your usb stick
Restart your mac
Download gdisk from https://sourceforge.net/projects/gptfdisk/files/latest/download
Double click the package and install gdisk.
Then open up your terminal and type diskutil list
Find the usb disk that you are trying to erase (/dev/diskx)
Unmount the disk you are trying to erase with diskutil unmountDisk force /dev/diskx
type use gdisk on the disk you want to erase. sudo gdisk /dev/diskx
Once in gdisk, type x for expert command and press enter.
Type ? to verify you are in the expert menu. Look for zap (destroy) GPT data structures and exit
Type z
When asked if you would like to delete the MBR partition also, type YES and hit enter.
Gdisk will now erase your GPT and MBR and tell you it is now okay to reformat in disk utility or another partitioning utility. Do so, and let us know if you can now format your disk.


IF NONE OF THIS WORKS. TRY THE FOLLOWING:


Unmount the disk you are trying to erase with diskutil unmountDisk force /dev/diskx
Use the DD command to erase your USB stick with zeros by entering sudo dd if=/dev/zero of=/dev/rdiskX bs=1m, where diskX is the usb disk you want to erase. This will take a long time. Please be patient.


FINALLY IF THAT DOESN'T WORK...
Create a linux live cd like linux mint, and boot from it. Then use gparted to erase and format your usb.

IF NONE OF THESE WORK...
Then your usb stick is most likely bricked and has hardware failure. Throw it out.