It can be solved by following ways
1.cook food which is required in your diet and know the quantity of food you consume
2.consume your food within a day or two
3.leftovers can be given to animals and birds
4.by having a backyard or worm composting
5.and by promising yourself that you will never waste food... as there are many others for whom YOUR FOOD IS THEIR FIEST.