(WHTM) — After a Thanksgiving feast, the chances are high there are quite a few leftovers. There are some things people should keep in mind to make sure they do not go to waste.

Keeping Thanksgiving leftovers safe to eat starts that day.

“Clean work stations, clean hands, cook your meat to 165 degrees,” Karns Food president Scott Karns said.

Karns said good leftovers require good habits on turkey day.

Get traffic alerts from the abc27 mobile app for the latest local delays and road closures

“You want to pack them up after the meal,” he said.

WellSpan executive chef Rosario Campisi said the two main factors in food safety are time and temperature. He said there is a temperature “danger zone” for food: about 40 to 135 degrees.

“If your food is anywhere in between that, bacteria can multiply and grow very rapidly,” he said.

That is why it is important not to leave food out too long.

“The rule is two hours in the danger zone, then you have to discard your food,” Campisi said.

To be extra sure, Campisi said get a digital thermometer.

“They’re 20 dollars, they’re very cheap,” he said. “It might sound kind of geeky, but right after your meal, take the temperature of your food.”

Some dishes are especially crucial to get in the fridge right away.

Get severe weather alerts with newsletters and push alerts from the abc27 Weather Team!

“Your custard pies are like your pumpkin pies. Your apple pies are okay to be sitting out for a day or two, but anything that’s made with milks and creams needs to go into the refrigerator,” Karns said.

Aim for the fridge with the rest of the food too.

“Shallow containers [are] better because it’ll cool it a lot better,” Karns said.

Leftovers should keep for three to five days in the fridge.

“But if you have a lot of something leftover, immediately freeze it,” Karns advised.

In the freezer, food can last several months.

“For quality purposes, I’d say about six months,” Campisi said.

Stay up to date with the latest news with the free abc27 News app for iPhone and Android

However, he added if food is packed in vacuum bags, that could even stretch to nine.

“That’s why Vacpack machines are so good, it allows for no surface air,” he said. “That’s what causes the freezer burn.”

Another tip: very hot food should not go in the fridge or freezer right away because it will actually raise the temperature inside. Both Karns and Campisi said to let food cool a little first.