No reason was given for the notice from the Ministry of Commerce, but it came amid ongoing coronavirus lockdowns and concerns over vegetable supplies after unusually heavy rain damaged crops.
The ministry also asked local authorities to keep supply chains running smoothly and prices stable.
State media later sought to quell concerns amid reports of panic buying.
"As soon as this news came out, all the old people near me went crazy, panic buying in the supermarket," one user wrote on the Chinese social media site Weibo.
The Economic Daily, a Chinese Communist Party-backed newspaper, urged its readers not to be alarmed, saying the government's advice was aimed at making sure that households were prepared if a lockdown was announced in their area.
The People's Daily newspaper said such notices were not unusual, but that it had come at this time because of issues including a rise in vegetable prices and recent Covid cases.
Food prices traditionally rise in China as winter nears, but the price of vegetables has surged in recent weeks because of the extreme weather.
Meanwhile, the country is continuing to use strict lockdowns to tackle coronavirus. China hopes to reach zero infections before it hosts the Winter Olympics, which begin in February.
Ninety-two new cases of coronavirus were reported in China on Monday, and Shanghai Disneyland was shut down for at least two days after a weekend visitor tested positive for Covid-19 after returning home.