0

Since we all know the general rule about random writing on SSD disks, I was wondering if shred command makes any sense on Ubuntu running on an SSD disk.

If shred reports fake result that it has found and securely deleted a file, could I then just use SHIFT + Delete?

What is the difference between shred command and SHIFT + Delete on Ubuntu running on an SSD disk?

1 Answer 1

2

shred overwrite a file to hide its content and optionally delete it.

Delete in Nautilus (the file manager) moves a file to the Trash folder. You can navigate to the Trash folder and select the same file and press Delete. This will "permanently" deletes that file as if you pressed Shift+Delete before the file was sent to Trash.

"permanently" delete means the space the file had occupied is marked as free space. The contents of the file is not destroyed. The file can still be recovered using file recovery tools.

Shift+Delete "permanently" deletes a file.

Deleting files in SSD works a bit differently than in HDD. SSDs can only delete a whole block. So, if a block contains two files, and you delete one, the other file has to be moved to another block before the whole block is deleted. This is called garbage collection. Constantly moving files around to delete other files would wear out SSDs quickly. The TRIM option tells tells garbage collection to wait until the other file in the block is deleted and only then delete the whole block. Source

Currently there is no way to securely delete a single file from an SSD other than send a whole block for garbage collection. See How to securely wipe files from SSD drive?

See What is the recommended way to empty a SSD? for how to securely erase a whole SSD.

Hope this helps

3
  • Thanks for a reply. But I did not understand the part with a pencil and writing of words one after another. I mean, I did not understand does that prevent others from restoring a file or not? Assuming that the other file in the block is not deleted. Another question, when another file on the block is deleted, does it mean that at that point the whole block is being deleted and files on it cannot be recovered?
    – ubuntico
    Nov 8, 2018 at 13:35
  • I have edited my answer and removed the part about pencil and paper. As the answer to the linked question at the bottom of my answer says, there is no way to securely delete a single file. You can securely delete the whole drive. i have added a link to that question in the answer.
    – user68186
    Nov 8, 2018 at 18:46
  • 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .