Undo, legally (5)
I believe the answer is:
annul
'undo legally' is the definition.
(I've seen this in another clue)
This is the entire clue.
(Other definitions for annul that I've seen before include "Render invalid" , "Quash" , "Nullify" , "scratch" , "Cancel, say a law" .)