Skip to main content

Erasing unused blocks on USB drive

I know that I wipe a USB drive from Linux by doing a dd overwriting the whole device with random data. This however may take a very long time.

Is it possible to do this faster (and still safely), by asking the drive to erase all unused space? That is to activate the flash erase process.

Edit: What I'm looking for is a way to do the electrical erase of all blocks in the flash. Blocks set aside for wear leveling should also be possible to erase.

Perhaps SD cards have better features for this.