Are there any benefits, in terms of performance or security in ‘wiping’ or overwriting an SSD before reinstalling Linux? And if so, what is the best way of doing it?

I’m planning on doing a clean install of Debian 13 on my laptop soon.

I’m currently on Fedora and using encryption and will be using encryption on Debian too. I do not have a separate home partition.

Thanks :)

  • monovergent 🛠️@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    15 hours ago

    Not really, unless it was previously used to store unencrypted data.

    If you want to destroy old unencrypted data, the fastest way that uses the fewest P/E cycles is to run Secure Erase with hdparm. Many modern SSDs perform hardware encryption, whether you set a password or not. Secure Erase just wipes the encryption key and installs a fresh one. That’s usually good enough for personal use, but it also depends on how well the manufacturer implemented hardware encryption, if at all.

    If you want the data gone and don’t trust the manufacturer, the Debian installer offers an option to overwrite free space when setting up partitions. Disclaimer that this would not touch the ~7% hardware-reserved spare blocks that may have been cycled in and out of service.

    The following are anecdotal:

    • Some SSDs might understand the idea of wiping with zeros and just throw out writes from dd in conjunction with if=/dev/zero, resulting in an apparent, but insecure wipe
    • I run wipefs -a /dev/yourDrive on fresh or reused drives to eliminate any potential issues with the remnants of an old partition table. This only erases partition tables, not data blocks.
    • A SSD in poor health started throwing errors about bad sectors and stalled the boot process. This was a test rig, so I didn’t really care about data longevity. A full overwrite with dd forced the SSD to retire the bad sectors and gave it a couple more years of useful life.