Dear Rabbi Simon,
Can I write G-d’s name electronically and delete it?
Thank you for your practical question.
The answer is that you may, as the digital image which appears on a screen does not have the sanctity (or relative permanence) of the written word. However, as a matter of sensitivity I would not encourage writing the name of G-d digitally (such as on a computer screen or handheld device) simply for the purpose of deleting it. This is a possible implication of the wording of your question—although I don’t presume this was actually your intent.
In my view, it remains “best practice” to utilise the form “G-d”—described by some as “a dash of respect”—even when writing digitally (as most of our writing is today in any case), in order to remind yourself and your reader(s) of the sanctity attached to the name of Hashem even in a foreign language.
Just for the sake of completeness, I will add that you need not use this approach when using other terms for “G-d”, such as Lord (L-rd) or Almighty (A-mighty).
I hope this is helpful.
Rabbi Rashi Simon