Felim McTague, a construction manager for Con Edison, said it was taking about two weeks per block to upgrade the gas mains in the meatpacking district of Manhattan. A crew of seven has to thread the new pipe — coated steel at the intersections, plastic in between — through a maze of steam pipes, phone lines, TV cables, and sewer and water mains. Every night, they have to cover the hole in the street with thick steel plates that can bear the city traffic.

“It’s a tedious process,” Mr. McTague said.

Because of how long an overhaul in New York City will take, some experts believe more effort needs to be devoted to detecting leaks and addressing them before they become serious.

Con Edison performs its own leak surveys of its mains at least once a year, sending teams out with sensors to measure the amount of methane in the air, according to officials, and more often in severe weather. The utility is still not doing enough, said Mark McDonald, who investigates gas explosions for insurance companies and property owners.

“Accelerated replacement is not the answer to today’s problem; it’s the answer to tomorrow’s problem,” Mr. McDonald said. “What needs to be happening is increased vigilance, increased leak surveys to spot these problems before it gets into someone’s house.”

Utility companies now largely rely on the noses of their customers to alert them to danger. The gas that flows through the network of pipes under the streets is naturally odorless, so a compound known as mercaptan that smells somewhat like rotten eggs is added.

In the case of the East Harlem explosion, Con Edison officials said a customer’s call less than 20 minutes before the explosion was their only warning about a possible leak. The utility quickly dispatched two crews.

They arrived too late.