The answer is undo
Undo is a function that reverses the action of an earlier action. In word processors, the undo function can undo deleted text or remove the most recently typed text. The undo button is like and eraser. If you write something and make a mistake, you could erase (undo) the mistake.