We present a compact and versatile cryofocusing-thermodesorption unit, which we developed for quantitative analysis of halogenated trace gases in ambient air. Possible applications include aircraft-based in situ measurements, in situ monitoring and laboratory operation for the analysis of flask samples. Analytes are trapped on adsorptive material cooled by a Stirling cooler to low temperatures (e.g. -80 °C) and subsequently desorbed by rapid heating of the adsorptive material (e.g. +200 °C). The set-up involves neither the exchange of adsorption tubes nor any further condensation or refocusing steps. No moving parts are used that would require vacuum insulation. This allows for a simple and robust design. Reliable operation is ensured by the Stirling cooler, which neither contains a liquid refrigerant nor requires refilling a cryogen. At the same time, it allows for significantly lower adsorption temperatures compared to commonly used Peltier elements. We use gas chromatography - mass spectrometry (GC-MS) for separation and detection of the preconcentrated analytes after splitless injection. A substance boiling point range of approximately -80 to +150 °C and a substance mixing ratio range of less than 1 ppt (pmol mol-1) to more than 500 ppt in preconcentrated sample volumes of 0.1 to 10 L of ambient air is covered, depending on the application and its analytical demands. We present the instrumental design of the preconcentration unit and demonstrate capabilities and performance through the examination of analyte breakthrough during adsorption, repeatability of desorption and analyte residues in blank tests. Examples of application are taken from the analysis of flask samples collected at Mace Head Atmospheric Research Station in Ireland using our laboratory GC-MS instruments and by data obtained during a research flight with our in situ aircraft instrument GhOST-MS (Gas chromatograph for the Observation of Tracers - coupled with a Mass Spectrometer).