The city has a plan to get rid of rats in public housing: Workers drop dry ice down the holes where the rats live. They cover the holes and wait.

But as Mayor Bill de Blasio witnessed at a demonstration Tuesday afternoon, sometimes there's a rat that gets away.

"The reality for so many people in this city is you wake up in the morning, you go out on your way to work or school, and a rat crosses your path. It's like your 'Good morning, New York,' right?" the mayor said at a press conference. "There's a rat, right in the middle of your life. You don't want that. It's not acceptable. We don't want to live that way."

Rats are not mold, or lead paint, or leaky roofs. But by setting out to eradicate them from public housing developments, de Blasio seems to be signaling that he is trying to improve the lives of NYCHA tenants.

"It's about time," one tenant said at the press conference, sitting next to the mayor.

That's even as his record on NYCHA is put under a microscope.

A few hours earlier, a lawyer representing public housing residents was in state Supreme Court, demanding that the city inspect NYCHA apartments for lead paint. In November, it was revealed that the city had failed to conduct mandatory inspections for thousands of apartments over a four-year period.

"We are here to argue a preliminary injunction before Justice Carol Edmead," Jim Walden, a lawyer for NYCHA tenants, said outside the courthouse. "The residents of NYCHA are being held hostage."

The judge ordered the city to re-inspect thousands of apartments for lead paint.

"I only know that without anyone instructing us to do it, we are just doing that," de Blasio said. "As long as I am here, you will have annual inspections, annual mitigation. We will pay whatever it takes to do that."

There appeared to be some confusion over the judge's instructions.

"The court has not ordered NYCHA to re-inspect apartments. The court has scheduled a hearing for next week," NYCHA Spokeswoman Jasmine Blake said.

In a separate NYCHA case about mold, a federal judge on Monday said the city needed to come up with a better plan with tenants to address rampant mold problems.

As for the rats in public housing? They have not landed the city in court — at least not yet.