Let's say that I have an unencrypted file and I'm trying to encrypt it and make sure the original file can not be recovered from my disk. If I, for example, create an archive, put the file into it and encrypt the archive it seems pretty obvious that even if I delete the original file it is still on the disk and can be recovered. From my understanding, if the file is on a hard disk, the original file can be overwritten and at that point data recovery should be practically impossible.
But as I understand with SSDs, this gets a bit more complicated. Since SSDs employ wear leveling, even if I were to overwrite the original file, it may not be written to the same physical location and therefore there is a significant enough chance it could be recovered.
So how can I securely encrypt files on a SSD?
By the way, the archive scenario I described earlier is just an example. From my understanding this problem should affect all encryption tools.