Wipe USB drive in Linux by overwriting with random data

Handy way to wipe a USB drive in Linux using dd and /dev/urandom:

jonas@yggdrasil:~$ sudo dd if=/dev/urandom of=/dev/sdc bs=4k
dd: error writing '/dev/sdc': No space left on device
15163393+0 records in
15163392+0 records out
62109253632 bytes (62 GB, 58 GiB) copied, 2227.1 s, 27.9 MB/s

Of course, make sure /dev/sdX is the USB device you want to wipe. DD isn’t being referred to as the “Disk Destroyer” for nothing 🙂

Leave a Reply