26
submitted 2 days ago by oeuf@slrpnk.net to c/linux@lemmy.ml

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 :)

you are viewing a single comment's thread
view the rest of the comments
[-] monovergent@lemmy.ml 9 points 1 day ago* (last edited 1 day 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.
this post was submitted on 07 Aug 2025
26 points (93.3% liked)

Linux

57120 readers
950 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS