Here is one sentence: I wish I could undo my actions.
Here is another sentence: Fortunately, we can undo most of the damage to the system by the war.
Does the term undo mean the same thing in both these sentences?
the same meaning