Some blackouts can be planned for, so it's worthwhile to learn the safe shelf life of food in your fridge.
How Long Will Food Last in a Refrigerator Without Power?

How Long Will Meat Last in a Fridge Without Power?
Not long, unfortunately. According to the Centers for Disease Control and Prevention (CDC), you should throw away any meat that has been in the fridge for four hours or more during the power outage.

How Long Will Dairy Last in a Fridge Without Power?
Sometimes you have some warning before your power cuts out, and you can prepare. If you know a storm is coming or there will be power line maintenance, start prepping. Gather some coolers and ice to hold some of your perishables.
Dairy will last about four hours in the fridge if the door hasn’t been opened. Keep your coolers at 40 degrees or below to prevent the dairy from spoiling.

How Long Will Eggs Last in a Fridge Without Power?
Eggs are another perishable that will make you sick if they spoil.
Part of prepping for a blackout means being ready to quickly eat anything you can’t transfer to coolers. So if you think you’ll be without power for four or more hours and you can’t get your eggs into a cooler, start making omelettes.

How Long Will Produce Last in a Fridge Without Power?
When prepping your kitchen for an outage, produce can often be quickly prepped and eaten even with no power. So rather than taking valuable storage away from your meat and dairy products, try to snack on your produce if the power won’t be back within four hours.

How Long Will Condiments Last in a Fridge Without Power?
When you’re prioritizing which food items to put into coolers, think about what really needs to be refrigerated. Many condiments don’t actually have to go in the fridge; we just keep them there for convenience. If they must be refrigerated and you can’t fit them into your coolers, toss them after four hours of no power.