we insert our USB , and open a terminal to look up the name of our drive
should output s.th. like (depends on your stick/system, in my case it is sdc)
8 48 15663104 sdc
be very careful that you select the right usb here, or you can do major damage on your disk!
normally, when you just inserted the usb, it should be th last one.
do not select e.g. sdc1, we want to erase the whole stick, so we just need sdc
to cleanup the stick, and overwrite the data with a random pattern you can make
dcfldd if=/dev/urandom of=/dev/sdc
careful! this might take a LONG time !!!
or you can do
if you want to check for bad blocks while writing you can use badblocks. the badblocks command will check your disk for bad blocks while writing random data. the pseudorandom algorithm used by this command is faster (although “less random”) than /dev/urandom, so it can be useful for large disks.
badblocks -s -w -t random -v /dev/sdc
or you can use wipe to be really sure
wipe -f -Q 5 -S r /dev/sdc
now our usb drive should be clean …