Consider the complications of undoing legislation which has been on the books and executive orders which will have existed for years. We have never convicted a president in impeachment but I do not think that such a conviction would result in the undoing of his actions while in office. The court might find that since he was Procedurally duly elected and sworn in, his actions in office will stand. On the other hand the court could hold as you suggest that his actions are void, ab initio . But this would imply many things besides just the repeal of statutes and executive orders. What about contracts? Do recipients of the medal of freedom have to give them back? What about all the reliance that individuals, governments and businesses have placed on the statutes, executive orders, and executive agreements entered into? A very, very thorny situation.
And one more reason why it is unlikely that the court will simply issue an order ejecting a president.
Actually the law itself might be Constitutional, but it would in effect never have been properly inacted, and thus not a law at all. Before they become laws, bills must be signed by the President, or passed over his veto by supermajorities of both houses of Congress. Any bill which he signed, would simply never have become law.
It would be one smell of a hess.