Jay Varma, the deputy commissioner for disease control at the city’s Department of Health and Mental Hygiene, said the outbreak was not surprising, considering the time of year and the fact that “these are schools and there wasn’t an expectation that they would be long-term facilities for the homeless.”

He said that the virus could not live for long after the school was disinfected and cleaned. “We don’t think there is a risk to students after they get back to school,” he said.

The zeal for sanitizing was strong at Graphic Arts, where reports of floors used as toilets spurred outrage and alarm. But there, as at other evacuation centers being partially or completely cleared for students, the evacuees said they had no better options. And they offered another perspective on the bathroom problems.

“Some are disabled and seniors,” said John Lewis, a man with an unkempt gray beard who said he worked in the kitchen of a private Hasidic school in Brooklyn before problems with his landlord left him living on the streets in Chelsea. “Some are not able to move fast enough to make it to the toilet. Some couldn’t make it to the third floor,” where the only bathroom available to the men was located. It had one working toilet.

The atmosphere turned ugly after officials of the city’s Department of Homeless Services officials took over the shelter from the American Red Cross, several evacuees said, describing workers who yelled through bullhorns at those who did not follow directions fast enough.