0

Main goal: Delete specific files without the use of CCleaner and Eraser in the shortest time possible without decreasing the life of a SSD drive.

Here's the thing. I have my C:\ drive and it's an SSD. I can't use Eraser nor CCleaner to clean up the free space because these programs said that it "could" slow down or decrease the lifetime of the SSD. The leftover files are currently around 1GB~ and growing. I've been able to create my own small tool from Java which enables me to locate specific files in my system to overwrite them with nothing.

Would this be a good practice to ensure that none of my files are recoverable assuming that I will no longer need the file then afterwards deleting them from my system through the trash bin?

0

No. That would not be "good practice" because you are:

  1. Not guaranteed to be writing to the same block as the previous data was stored in, due to the wear leveller in the SSD controller, thus not actually "erasing" your data.
  2. Needlessly writing to the disk and thus meaning that 2 or more flash cells are written and erased rather than just the original one containing the data.

What you want to do is TRIM the disk block where your file is stored in order to tell the SSD controller that this block can be erased.

Windows should naturally TRIM the disk at some defined period, but for tools you should check with your SSD manufacturer. We have a few related questions here:

0

I disagree with the answer as TRIM does not erase the data, it just allows it to be erased later on - and indeed if cells go bad, data is never actually deleted and some may be recoverable.

I put to you the best way to handle this is to rebuild the partition on an encrypted filesystem (bitlocker / Veracrypt / LUKS). You can then use software to overwrite the files with zeros "in place" (using something like shred or sdelete). This will make sure that the data is really gone when you zero it out because you have virtualised the underlying device such that if the SSD moves data around its moving encrypted blocks.

For maximum benefit, make sure your disk encryption system supports TRIM.

3
  • Disk encryption supporting the trim command can leak information about which parts of the disk actually have meaningful data in them but admittedly them being encrypted in the first step place will reduce the attack surface. I do take the criticism about not knowing exactly when the data will get erased though, it is a fair comment and I considered it a trade-off for not writing unnecessarily to the disk. – Mokubai Jul 24 '17 at 8:21
  • Generally though erasing the data in the encrypted container will still not actually remove the data on the disk as you are still operating at a level above the disk wear leveller. It is largely pointless and is just writing data unnecessarily again. Simply wiping the encrypted partition key is enough to turn the disk into what is effectively unrecoverable garbage. Erase key, reformat, start again - effectively a clean disk. If the data is of a sensitive nature and you can't trust the timing of the TRIM commands then yours is the solution I'd go with, but for minimal writes mine is correct. – Mokubai Jul 24 '17 at 8:32
  • Agreed on wiping the partition key to wipe the disk - my assumption is that he only wants to wipe certain files, and I think we are largely in agreement generally. (I only disagree about the wear leveller bit - because you are overwriting the data with zeros so even if you could read the data, you would get either zero's - above the wear leveller, or encrypted data below the wear leveller. I acknowledge you may be able to do something if you are highly motivated and can get the key from memory and the encrypted raw data). – davidgo Jul 24 '17 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.