If you hosted Thanksgiving this year, it’s likely you have some leftovers.
There’s a time limit on how long you can safely store that hearty turkey and cranberry sauce though, according to the U.S. Department of Agriculture (USDA).
Here’s what you need to know as you pack your Thanksgiving favorites away.
Depending on whether you’re planning to stash your food in the fridge or freezer, Thanksgiving leftovers can last anywhere from three to four days to two to six months.
To ensure your food is stored away before harmful bacteria can form, the USDA recommends dividing up dishes into shallow containers within two hours of cooking. It’s OK if your food is still warm when you pack it up, the national agriculture and food safety authority reports.
Cooked and carved turkeys can be kept in a fridge for three or four days if the meat has been placed in shallow containers, according to the USDA’s Food Safety and Inspection Service (USDA FSIS).
Storing leftover turkey in a freezer can provide longer storage periods, the USDA FSIS says.
“When frozen under 0 [degrees Fahrenheit], leftovers will remain safe indefinitely, but quality may change over time,” the USDA FSIS wrote in an updated Thanksgiving food safety guide.
The same refrigeration and freezing guidance is true if your family enjoys other meat-based protein sources on Thanksgiving Day, including cooked chicken, cooked pork and cooked beef, according to storage directions outlined on the USDA FoodKeeper App.
Plant-based alternatives like tofu can be stored for up to one week in a fridge if it was served fresh or it can be stored for five months in a freezer, according to the USDA FoodKeeper App.
The USDA said leftover stuffing should be consumed or frozen within three or four days. When frozen, stuffing can last between two and three months.
Uncooked stuffing can also be frozen, but it will need to be cooked immediately when removed from a freezer, according to the USDA’s “Handling Stuffing with Care Guide.”
The frozen stuffing should be cooked until it reaches 165 degrees Fahrenheit, according to the USDA.
Mashed potatoes and other Thanksgiving vegetables like yams and green beans can last three or four days when stored in a fridge, according to the USDA FoodKeeper App.
Thanksgiving cranberry sauce can be homemade or come from a can, but both options have a drastically different shelf life.
Homemade cranberry sauce can be refrigerated for seven to 10 days after purchase while canned cranberry sauce can be refrigerated for one to two weeks after opening, according to the USDA FoodKeeper App.
Freezing is not recommended because thawing cranberry sauce may make it “become too watery,” the USDA FoodKeeper App reports.
Leftover gravy can be stored in a fridge for three to four days or in a freezer for four to six months, according to the USDA.
When reheating gravy, the USDA recommends boiling the liquid to ensure its safety. The same is true for leftover sauces and soups.
The USDA said homemade pies that contain egg, cream or chiffon can be stored in a fridge for three to four days, including pumpkin, pecan, lemon meringue and custard pies. Fruit-based pies, on the other hand, can be stored at room temperature for one to two days or in a fridge for up to a week.
Store-bought or bakery pies may contain preservatives, so the USDA recommends consulting the pie’s packaging or baker in these instances.
While the USDA does not have freezing guidelines for baked pies, the Michigan State University Extension school — an economic program in East Lansing, Michigan — reports that baked pies can be frozen for up to six months.