How long does my food stay safe after the power goes out?

File photo of a man looking into his refrigerator. File photo of a man looking into his refrigerator. Photo: Ghislain & Marie David De Lossy/Getty Images Photo: Ghislain & Marie David De Lossy/Getty Images Image 1 of / 1 Caption Close How long does my food stay safe after the power goes out? 1 / 1 Back to Gallery

Gusty winds and hot weather increased the risk of wildfires in Northern California this August, leaving many residents without power as PG&E took preventative measures. This left many residents wondering, as the power comes back on, do I have to throw out all my food after a power outage?

Food safety during a power outage comes down to temperature, so the best way to accurately monitor your food is with an appliance thermometer. Found at most hardware or grocery stores, place them in your refrigerator and freezer before an outage so you can properly gauge the temperature as it rises — and once the power comes back on.

When your power is on, the freezer temperature should be at or below 0° F and the refrigerator should be at or below 40° F. After the power goes out, it’s important to keep the refrigerator and freezer doors closed as much as possible to maintain the cold temperature. Resist any temptation to check on your food — only open doors if you're taking something out.

The refrigerator will keep food cold for about four hours if it is unopened. As temperatures rise, bacteria are more likely to grow on the food, even if you don’t see it. The FDA says that if the food was above 40º F for two hours or more (or one hour if temperatures are above 90 º F) — discard it.

Food safety advocate and attorney Bill Marler said he thinks most people know to throw out raw meat or dairy after too much time, but that there may be foods the public isn’t thinking about that could pose a higher risk.

“I think people don't always think about fresh fruits and vegetables and deli meats and cheeses as riskier products,” he said. “Once you reach a 45, 50-degree temperature, the bacteria will grow fast.”

He said the risk of listeria is higher in certain foods as they warm-up and he personally will throw things out rather than take the risk.

A full freezer will keep its temperature for approximately 48 hours (24 hours if it is half full) if the door remains closed. A good trick is to keep foods grouped closely together and move foods that are able to be frozen from the refrigerator to the freezer before an outage. Then, fill up any remaining space by making ice cubes or filling up containers with water. Your freezer is more likely to stay cool and you can use the water and ice as drinking water should you need it.

“If you’re thinking about the power going out, you could really pack your freezer with things,” Marler said. “Make ice cubes, move products from your refrigerator. The more you have a packed, frozen freezer, the longer the freezer will stay cold than if it only had a few things in there.”

Once the power is back on, calculate how much time has passed, check the temperature and then evaluate each food item individually for ice crystals. If there are still crystals, you can safely refreeze it again.

If you’re still unsure, the USDA has an extensive list of food items that can help guide you on what to throw out and what to keep. The general rule is to toss milk, dairy products, meats, fish, poultry, eggs and leftovers if you’re in doubt.

But there are some exceptions, so it’s good to consult the list. For example, you can likely keep hard cheeses like cheddar, swiss and parmesan, but you may have to throw out soft cheeses like brie, ricotta and mozzarella. And you can keep the butter, but pitch the eggs.

While PG&E likely won’t give you any payout for spoiled food, it’s good to check your renters or homeowners insurance to see if it covers spoiled food.

Tessa McLean is a digital editor with SFGATE. Email her at tessa.mclean@sfgate.com.