Reset Your USB Flash Drive with Linux

How To Reset Your USB Flash Drive with Linux Using the Command Line

Let’s face it, sometimes you play around too much with your devices and screw things up a little. So it’s time to reset… here’s how to fix and cleanly wipe a USB flash drive that refuses to partition:

danten@starlight:~$ dd if=/dev/zero of=/dev/sdb bs=1M count=10

And voila your USB flash drive will be good to go.

Just remember to be really careful and choose the correct /dev/sdX (the above /dev/sdb might not be the right device for you) and so you don’t accidentally wipe your main drive.