There is provided a method of cooking and sterilization of food arranged in a sealed package comprising a one-way valve that opens at a supra-atmospheric pressure of 20-200 mbar, said method comprising the steps of: a) heating the sealed package to cook the food; b) subjecting the sealed package from step a) to a sub-atmospheric pressure such that gas leaves the sealed package through the valve; and c) autoclaving the sealed package from step b) at a supra-atmospheric pressure.