The present disclosure relates to a method for retorting a package 2 of a porous packaging material 3. The method comprises providing the package in a chamber 4 of a retort 1. The method also comprises, in the chamber, raising the temperature, from a first temperature to a second temperature, and the pressure, from a first pressure to a second pressure, such that gas in the porous packaging material is subjected to a volume change which is less than 50% by volume. The present disclosure also relates to a retort configured for performing such a method.