Updated

President Obama has some advice for President-elect Donald Trump: Do as I say, not as I do.

The outgoing president, in an interview with NPR, urged his successor to pursue policy changes through Congress and not via executive order.

“Going through the legislative process is always better in part because it’s harder to undo,” Obama said.

The pen-happy president may be learning the hard way, after he accelerated his use of executive actions in his second term. Frustrated by Republican opposition in Congress, Obama in 2014 had openly shifted tactics to rely on executive and administrative actions to pursue his agenda.

“I’ve got a pen and I’ve got a phone,” he declared at the time.

While some of his subsequent directives were uncontroversial, others were sweeping and met immediately with legal challenges. Some of the most ambitious executive actions were meant to shield millions of illegal immigrants from deportation; however, the Supreme Court effectively blocked those 2014 changes this past June

Trump may pick up where the courts left off. The president-elect vowed during his campaign to “cancel every unconstitutional executive action, memorandum and order issued by President Obama.”

If Trump were to pursue his own executive actions, Obama said his successor would be “entirely within his lawful power to do so.” Further, Obama suggested Trump would be within his right to review and reverse his administration’s actions.

“If he wants to reverse some of those rules, that's part of the democratic process. That's … why I tell people to vote — because it turns out elections mean something,” Obama said.

Obama, explaining his own strategy in office, told NPR he wanted to pursue legislation and only went the executive-action route on immigration after being stalled in Congress.

“My strong preference has always been to legislate when I can get legislation done,” Obama said. “In my first two years I wasn't relying on executive powers because I had big majorities in the Congress and we were able to get bills done, get bills passed. And even after we lost the majorities in Congress, I bent over backwards consistently to try to find compromise.”

He said he “held off for years taking some of the executive actions that I ultimately took” on immigration.