Think of your freezer as a pause button: food in a freezer won’t deteriorate and most bacteria cannot grow in it. You can freeze pre-packaged food until midnight on the use-by date, and leftovers and homemade goods should be frozen as soon as possible, but make sure to let any warm dishes cool completely first.