

Regarding 'reserve sectors' and overprovisioning: If a card claims it's n bytes in capacity it has internally a larger capacity. Other usesīesides quickly wiping out data for privacy, supposedly blkdiscard, similar to fstrim for an SSD, will improve wear-leveling and make some SD cards generally run a little bit faster. Hopefully someday Linux will allow blkdiscard to be run on removable devices without requiring root privileges which would make it much less dangerous. Unfortunately, using -force means that all checks, including if the drive is in use, are disabled. The current implementation requires the -f, -force option if the drive is already formatted, which is (almost) always going to be the case since SD cards come pre-formatted. That would be a nice safety feature, but it is not true as of this writing. The manpage claims that, to be safe, it will only work if the drive isn't already mounted. You better be sure that you are pointing it at the right device and then double-check again. Since blkdiscard must be run as root, it can easily destroy all of your data. If you do not have a device that can speak directly to the low-level SD card, it is possible to build one out of an Arduino and run SDFormatter.ino. The difference is that kernel needs to have access to the low-level MMC subsystem, which USB abstracts away as a generic "mass storage" device. Note that while this works on my laptop and Raspberry Pi, it would not work on a USB SD card reader.

z, -zero zero-fill blocks rather than discard. Use -s if you wish to be a little more secure and force garbage collected blocks to also be erased. As has been pointed out elsewhere, a normal CMD38 will make some blocks appear empty, but leave others plainly visible due to garbage collection. This calls the Linux BLKDISCARD ioctl, which in turn passes CMD38, the same as SD Memory Card Formatter. To quickly erase an entire SD card, you can use the blkdiscard (8) command.
