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?

ubuntico
  • 2,872

1 Answers1

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

user68186
  • 37,461