Fats and oils when kept for a long time get oxidized because of which the taste and odour of food containing these fats changes and it becomes unfit for consumption. This is called rancidity.
Following ways can prevent rancidity:
i) Storing food in an airtight container.
ii) Antioxidants are added to foods containing fats and oils.
iii) Flushing packed food items with an inert gas like nitrogen.
When fatty substances are exposed to air, its unsaturated components are converted into hydroperoxides, which break down into volatile aldehydes, esters, alcohols, ketones, and hydrocarbons, some of which have disagreeable odours.