to reverse the effect or result of something; to make something as it was before
“She tried to undo the knot in the rope.”