The evolution of circumstellar matter around a massive star during the red supergiant phase is investigated. It is shown that, if heat conduction is present, the cavity carved around the star during its main-sequence phase may deflate substantially and even disappear completely in extreme cases. I also find that thermal conduction may cause a shrinking of the cavity already during the main-sequence phase; in this case the bubble tends to settle at a smaller radius. I consider how the evolution of Wolf-Rayet ring nebulae and supernova remnants is affected, and discuss particular astronomical objects such as SN 1987A, the Cygnus Loop, N132D and the WR nebula around HD 197406.