If the law has been taken off the statute books, it has been repealed.
repeal vb (tr) {Collins}
(Government, Politics & Diplomacy) to annul or rescind officially (something previously ordered); revoke
these laws were repealed
If it is still on the relevant statute books but is no longer enforced, probably because it is seen as no longer necessary or helpful (or it is now realised that it always was petty, unjust or unenforceable), it is said to have fallen into abeyance.
in abeyance {Longman Dictionary of Contemporary English}
something such as a custom, rule, or system that is in abeyance is not
being used at the present time
fall into abeyance (=no longer be used)
The Forest law fell into abeyance.