[en] The influence of relative humidity (RH) on the extremely slow compaction dynamics of a granular assembly has been experimentally investigated. Millimeter-sized glass beads are considered. Compaction curves are fitted by stretched exponentials with characteristic time τ and exponent δ, which are seen to be deeply affected by the moisture content. A kinetic model, taking into account both triboelectric and capillary effects, is in excellent agreement with our results. It confirms the existence of an optimal condition at a relative humidity ≈45% for minimizing cohesive interactions between glass beads. The exponent δ is seen to depend strongly on the diffusive character of grains and voids inside the packing: diffusion for cohesiveless particles and subdiffusion when cohesion plays a role. As a consequence, the RH represents a relevant parameter that should be reported for every experimental work on a slowly driven dense random packing.