microSD card: wiping before selling 0 ▲ ¬ just serendipity 🍀 2 hours ago · Tech · hide · 0 comments ♠ Problem statement: I want to sell a 32 GB microSD card, previously used to boot a Raspberry Pi. % diskutil list disk4 /dev/disk4 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *32.0 GB disk4 1: Windows_FAT_32 BOOT 268.4 MB disk4s1 2: Linux 31.7 GB disk4s2 For that, I would like to securely wipe it. dd is my preferred tool to do so. % diskutil unmountDisk /dev/disk4 Unmount of all volumes on disk4 was successful % sudo dd if=/dev/zero of=/dev/rdisk4 bs=4m dd: invalid number: '4m' That is GNU dd from coreutils (installed via homebrew) shadowing the BSD one in PATH. BSD dd takes bs=4m, GNU dd takes 4M. It’s hard to standardize and agree upon something so simple, eh? /dev/rdisk4 rather than /dev/disk4 because the raw node skips the buffer cache and thus it is several times faster: % sudo dd if=/dev/zero of=/dev/rdisk4 bs=4M status=progress dd: error writing '/dev/rdisk4': Input/output error 7633+0 records in 7632+0 records out 32010928128 bytes (32 GB, 30… No comments yet. Log in to reply on the Fediverse. Comments will appear here.