With proper physical mechanisms of energy and momentum input from around the centre of a self-gravitating polytropic gas sphere, a central spherical ‘void’ or ‘cavity’ or ‘bubble’ of very much less mass contents may emerge and then dynamically expand into a variety of surrounding more massive gas envelopes with or without shocks. We explore self-similar evolution of a self-gravitating polytropic hydrodynamic flow of spherical symmetry with such an expanding ‘void’ embedded around the centre. The void boundary supporting a massive envelope represents a pressure-balanced contact discontinuity where drastic changes in mass density and temperature occur. We obtain numerical void solutions that can cross the sonic critical surface either smoothly or by shocks. Using the conventional polytropic equation of state, we construct global void solutions with shocks travelling into various envelopes including static polytropic sphere, outflow, inflow, breeze and contraction types. In the context of supernovae, we discuss the possible scenario of separating a central collapsing compact object from an outgoing gas envelope with a powerful void in dynamic expansion. Initially, a central bubble is carved out by an extremely powerful neutrinosphere. After the escape of neutrinos during the decoupling, the strong electromagnetic radiation field and/or electron–positron pair plasma continue to drive the cavity expansion. In a self-similar dynamic evolution, the pressure across the contact discontinuity decreases with time to a negligible level for a sufficiently long lapse, and eventually the gas envelope continues to expand by inertia. We describe model cases of polytropic index γ= 4/3 −ε with ε > 0 and discuss pertinent requirements to justify our proposed scenario.