A method of and apparatus for manufacturing a beverage package such as a bottle, carton or can containing beer, lager, ale, or stout. To alleviate contamination of the beverage in the sealed package by oxygen, the headspace of the container is filled prior to sealing of the container, with a froth or foam formed remotely from the container by the (or a different) beverage and carbon dioxide and/or an inert gas such as nitrogen. The froth or foam is fed into the headspace of the containers (15) between the beverage filling and sealing stations by way of outlets (21) forming part of a rotary valve (14). The containers (15) are moved sequentially along a circular path (16) by a star wheel; a plate (19) of the valve (14) is carried on struts (17) by, and to rotate in unison with, the starwheel and relative to a fixed plate (19) of the valve.; Relative rotation between the plates (18) and (19) controls the valve to determine the flow of preformed froth or foam from a supply conduit (9) to the outlets (21) which are carried by and rotate with the plate (18). Preferably the valve is arranged so that the froth or foam is delivered to the containers (15) only while such containers are located on the starwheel below the respective outlets (21).