So, they've ordered a mass clean-up – an army of people disinfecting thousands of compounds and residential areas aiming to eradicate the virus.
Then China's financial capital will open up, but it will be gradual, tentative, cautious.
The brutal "war" against Omicron has left a scarred city. People as old as 100 were among those who tested positive and were taken to quarantine centres. There were very few exceptions.
In the five weeks that I've been locked down, unable to go any further than the gate at the end of my compound, it's Shanghai's most vulnerable who've suffered the most.
One man called Wu who was quarantined documented what he saw on Douyin (known as TikTok outside of China). "We don't have enough medical resources now, they can't be treated in hospital like in normal days," he said.
At one point he saw an 85-year-old woman who fell ill. She was saved by emergency medics. We've heard harrowing stories from the family of a 90-year-old woman taken in after she tested positive. Officials insisted she be sent to a government facility.
Her family, who asked not to be identified, were worried about her eating and how she'd go to the toilet on her own. Her husband, also in his 90s and bedridden, was able to stay at home.
Others have told of us about more dire circumstances for patients in a hospital that was hit by this wave of COVID-19 early on. Last month we reported on patients at Donghai Elderly Care Hospital who died after testing positive. This was while the official death toll in the city was zero.
One man told us his 90-year-old sister had died, sharing a room with five others. He has contacted us again and told us all the others in her room have since died.
A care giver in a hospital said in a text exchange that "a lot died in the intensive care wards", but they added they were "not sure about exact numbers". The official death toll is now 491, as of 4 May. Almost all of those were elderly and unvaccinated. Only 38 percent of the over-60s in Shanghai have the full protection of three vaccine jabs.
Some districts have just announced fresh efforts to increase that, a month into lockdown.
At the very top, China's leaders remain adamant that chasing "zero COVID" is the right thing. President Xi Jinping, the man in charge of China's ruling Communist Party, has made it clear there is no change. He believes "persistence is victory".
This is now a test of China's way of dealing with the coronavirus. It's a test of his credibility too.
The language of the battle has evolved, though. Whereas lockdown became known as "static management" in state-controlled media, the government has been forced to shift its goal to what it calls "societal zero"; that is, no positive cases emerging outside controlled quarantine areas.
That goal is close. The reported case numbers are falling, but it's a way off "zero". The enforcement methods have been harsh at times.
Some people were barricaded into their homes, or forced out of them. Communities, including mine, have been fenced off. Green barriers have appeared all over the city, erected across roads.
There is little room for dissent or to focus on shortcomings.
One man was questioned by police for simply showing his shopping to someone recording on a phone. The slab of pork, as a stamp proved, had been donated from a neighbouring province. His transgression appeared to be highlighting the food supply problems. A small-scale protest in parts of Shanghai a few days ago was quickly condemned. People were seen banging pots in parts of the city. Officials said it had been influenced by "foreign forces".
One part of China has changed tack, though.
Hong Kong had tough restrictions. It was all but closed off from the rest of the world for a time, but there was no lockdown. Then it was over-run by Omicron.
Hong Kong recorded the highest average weekly death rate in the world, at the time.
Professor Ben Cowling from the University of Hong Kong told me he estimates over 60 percent of the population were infected, and it now has herd immunity to the BA2 variant.
He said he is worried about another wave of new variants, but given the spread the city has just been through, he said, "I don't think it will have a high impact".
"My concern in Shanghai would be how long can this go on?" Prof Cowling said.
The number of reported positive cases is "going to drop down slowly", he thinks "but the whole thing could happen again in a month, or two months, or three months if there's another outbreak of Omicron". Debate about herd immunity and the idea of "living with it" on the mainland has been shut down in public. The focus is on what President Xi has called winning a "final battle".
It's a battle against a virus that China officially declared victory over in the summer of 2020.
But it's one that Xi is determined to win as he heads for a crucial meeting of the Party's Congress in October and what he hopes will be a third term in power, the first leader to do so in a generation.
China's capital Beijing is now trying to stop the virus spreading, repeatedly testing most of its residents.
Defending the seat of power is crucial for the Communist Party's reputation.
Most of China has been virus-free for almost two years, and that remains the case.
But as Omicron threatens there's renewed anxiety. An already fragile economy – still so crucial for global growth and supply chains – is under growing pressure.
Lockdowns in the name of "zero COVID" could be harder and harder to justify.