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 :)
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:
dd
in conjunction withif=/dev/zero
, resulting in an apparent, but insecure wipewipefs -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.dd
forced the SSD to retire the bad sectors and gave it a couple more years of useful life.