How to wipe out data on a ssd without doing harm to its age?

Hey, I really really need your help right now
I kinda messed up everything
At first, I was using dd to erase my ssd, but the process lasted for ages so I closed the terminal
And then I used shred to wipe my data, but I did a little research and found out shred is bad for ssd so I freaked out and I stopped the process again
Now I don’t know what to do.

“Wiping data” is a pretty broad thing and tools like shred and scrub are more extreme remedies and not practical for every day cases. On most filesystems, deleting a file means removing the metadata for it, but the data is still technically there. The ability to recover data at that point depends on the filesystem, amount of consecutive writes, and a lot of luck. ext4 is likely going to be easier to forensicly recover than the default btrfs. However, for SSDs, a trim operation is done about weekly to actually remove the data since the leftover data can slow down the drive over time. You can run this manually against a filesystem by running fstrim. There is also a mount option to always trim on delete, but you are correct that it may reduce the life of an SSD. Running fstrim occasionally after deleting something normally will likely get you what you want and doing so occasionally shouldn’t significantly tax your SSD.


I actually just want to wipe data once, not doing it on a schedule
And I just found out that I can use tools from the official vendor to erase data on the disk, would you suggest that method?

It depends what kind of ssd it is and what it supports.

Generally speaking, if it supports and kind of secure erase, you should use that.

The Arch wiki walks through your options pretty cleanly.

1 Like

Thanks for the replies from you guys, but I’ve asked other people and they provided me with a solution which is ATA secure erase