President Trump’s dismissal of Preet Bharara as New York’s US attorney leaves a giant hole here. Now the challenge is to find someone who can fill his shoes.

But this much is clear: New Yorkers will long be grateful for Bharara’s work — and its impact will be long felt.

Start with his Albany house-cleaning. As Assembly speaker, Democrat Sheldon Silver was a key power player — one of Albany’s “three men in a room” — for more than two decades; his influence on local politics was immeasurable.

But Bharara zeroed in on Silver’s corrupt side and got a jury to convict him. Silver’s now out and headed for the Big House. Ditto for another of the three men, Republican state Senate Majority Leader Dean Skelos.

Those two convictions sent tremors throughout New York’s political world. But Preet wasn’t done: His investigation of folks tied to Gov. Cuomo (the third of the three) led to eight indictments. He also launched a multifaceted probe of Mayor de Blasio and his aides. What happens there could determine the city’s next mayor.

Bharara put away numerous other lawmakers, too, pursuing them without, as he put it, “fear or favor.” And he didn’t snag just politicians: Since becoming US attorney in 2009, he’s gone after countless bad guys, from terrorists to Wall Street fatcats to gang-bangers and cyber-criminals.

Given his record, and the fact that he was in the middle of big probes, we called on Trump to keep Bharara on; with him gone, the future of those probes is uncertain.

Trump must have seen the move as all or nothing and asked for the resignation of all 46 Obama-era holdovers. Bharara had to go.

But New Yorkers owe the now ex-prosecutor a big debt of gratitude for his service. They can only hope his replacement will come at least close to his standards.