Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to wipe a SD card in Ubuntu

📅 2013-Mar-25 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ blkid, fdisk, sd card, shred, ubuntu ⬩ 📚 Archive

Note: Unlike hard disks, SD cards cannot actually be securely wiped such that data is fully unrecoverable. The only way to do that would be using an erase functionality of its firmware, if it has one. Else physical destruction of the SD card! 😊

SD cards are commonly used in cameras and smartphones to store photos and other personal content. Even after these files are deleted they can be easily recovered from the SD card. So, it may be essential to completely erase the SD card such that data recovery is very difficult (but not impossible).

$ sudo fdisk -l
$ sudo blkid
$ sudo shred -v /dev/sdb1

By default, shred will overwrite the entire partition 3 times, making it really difficult to recover any old content from it.

Tried with: CoreUtils 8.23 and Ubuntu 15.10


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧