How does one permanently delete files on an SSD?

Probably the wrong place, but i figured you guys know how to do everything so…

Have googled but keep getting articles wanting to sell me software. Not,e i am not one of those sickos, i just don’t want personal details to be recoverable, when i donate some older laptops to kids for lock down learning etc

Thanks and apologies to mod, in advance, if you have to move my post.

dd if=/dev/urandom of=/dev/sdX bs=1M

That command will fill your whole drive with random data. Use at your own risk!!

Ah thanks, i was think more along the lines of keeping existing files but erasing the empty space. Is there nothing a bit more efficient and less wearing?

You can use sdelete shred for the purpose

Isn’t that just for HDD?. I know SSD work differently and it’s a little more tricky to do, hence my question.

Using ssd’s makes the job more difficult.

You can use this command:

shred -zvu -n 10 filename

In which z denotes to fill the file with zerosu means delete the file after filling.
10 means filling the file ten times before delete it.
If what you want to remove include some folders, then you can use the wipe command:

wipe -ri foldername

Which would permanently remove the folder and something in the folder recursively.

Not that I know. Take a look at man shred for more info or maybe @linux-aarhus can shed some light on that.

Hi, you may want to check out the following

For me (a Surface Pro user), it requires using a tool provided by my vendor (Microsoft) to wipe the SSD.

Ah thank you very much. Those links look promising. I will have a good read up and hopefully attempt some erasing. I realise now my error, i think i should have used encryption then it wouldn’t matter what was on the drive.??

Anyway thanks again!

As long as you are not being targeted by the NSA you’ll be fine. Good luck!

Run an encrypted system, for instance LVM on top of a LUKS container.
I’m very comfortable of selling or giving away my drive as it is.
The contents are indistinguishable from having been overwritten with random data …
… that’d be my take on the matter :wink:

1 Like

While I don’t know the current state of SSD’s - my current knowledge of SSD storage in general - tells me that it is very unlikely that shred - will work reliably on SSD.

It will for sure invalidate the file and this will suffice for most usage - unless you are targeted by NSA or other highly motivated sophisticated agencies and in such case only a hammer - a drill followed by petrol and lighter works effectively.

It is also possible to attach to wire ends using clamps and the send send your household power through it - then use the hammer - drill - finishing with petrol and lighter.

1 Like

Indeed encryption is the way to go. Prevention is better than any cure.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.