Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

16
  • 4
    Seconded +1. Don't "erase" an SSD by writing zeros (or bulk writing anything, for that matter) Commented Jun 16, 2020 at 10:40
  • 22
    How is blkddiscard "equally safe for you use case"? It just discards the blocks and tells the SSD it can re-use them. Someone with firmware-level access to the SSD can still recover data. At least explain the risks. Commented Jun 16, 2020 at 10:50
  • 19
    The user explicitly said: I'm not dealing with sensitive data here and don't need to protect the drive from a knowledgeable. Is "dd if=/dev/urandom of=/dev/sdc bs=1M count=2" the fastest way to erase a HDD while offering some security towards recovery then? Among all of the commands you've offered this is by far the slowest. Also usually unnecessary as writing zeros is enough to destroy data permanently (and has been for the past ~20 years). Commented Jun 16, 2020 at 11:05
  • 5
    If you intend to overwrite exactly 2MB of data, then it's near instant for most modern desktop CPUs. Try it for 1TB of storage, i.e. without count :-) Commented Jun 16, 2020 at 13:14
  • 4
    @dirkt, blkdiscard, if properly implemented, erases the data blocks and puts them into a "ready to use" state. This is exactly identical to the first half of the "read-modify-write" cycle the drive uses when updating the contents of a data block, and when applied to an entire drive, should result in a drive full of "1"s. Commented Jun 17, 2020 at 2:29