A long-standing problem in managing the behaviour of a collection of solid grains concerns the nature of the grain packing1, a property that is typically controlled by how the grains are poured or shaken. Here we show that a systematic and controllable increase in granular packing can be induced by simply raising and then lowering the temperature, without the input of mechanical energy. This thermal processing may have important practical implications for the handling and storage of granular materials.