Ms. Garcia said that her department continues to monitor sites where litter baskets are removed. In Harlem, there has been improvement on corners where household trash was often piled alongside litter baskets, she said. “We’re just not seeing the same amount of litter and trash on those corners,” she said.

In Harlem, the removal of the 223 litter baskets still leaves more baskets there than in other neighborhoods, sanitation officials said. Currently, there are 1,399 litter baskets in Harlem, compared with 779 baskets on the Upper West Side and 719 on the Upper East Side.

The officials also noted that the overall cleanliness of sidewalks in Harlem has improved in recent years, as reflected in city inspection reports. A total of 1,993 violations were issued to property owners for dirty sidewalks in fiscal year 2018, down from 2,434 the year before, according to city records. However, the number of violations during the same period for litter along street curbs rose to 6,079 from 5,796.

Harlem residents counter that sanitation officials should be putting out more litter baskets and emptying them more often — not taking them away — and keeping a closer eye on the baskets to prevent misuse.

“I’m an eighth-generation New Yorker,” said Christina Fernandez, an elementary-school teacher. “Never before have I experienced an intersection in New York without trash cans — and usually at least three out of four corners have them.”

Gale A. Brewer, the Manhattan borough president, said she had received complaints for months about the missing litter baskets in Harlem, and more recently, the Upper West Side. Her office has sent multiple emails and letters to sanitation officials to protest the removal of the trash cans and to seek an explanation of the agency’s policy. “Residents asked for enforcement against dumping, more trash pickups and more trash cans, but it seems like what they got was fewer trash cans, a worsened dumping problem and even some inappropriate tickets,” she said. “The neighborhood deserves better.”