  The era of Gravitational-Wave (GW) astronomy will grant the detection of the
astrophysical GW background from unresolved mergers of binary black holes, and
the prospect of probing the presence of primordial GW backgrounds. In
particular, the low-frequency tail of the GW spectrum for causally-generated
primordial signals (like a phase transition) offers an excellent opportunity to
measure unambiguously cosmological parameters as the equation of state of the
universe, or free-streaming particles at epochs well before recombination. We
discuss whether this programme is jeopardised by the uncertainties on the
astrophysical GW foregrounds that coexist with a primordial background. We
detail the motivated assumptions under which the astrophysical foregrounds can
be assumed to be known in shape, and only uncertain in their normalisation. In
this case, the sensitivity to a primordial signal can be computed by a simple
and numerically agile procedure, where the optimal filter function subtracts
the components of the astrophysical foreground that are close in spectral shape
to the signal. We show that the degradation of the sensitivity to the signal in
presence of astrophysical foregrounds is limited to a factor of a few, and only
around the frequencies where the signal is closer to the foregrounds. Our
results highlight the importance of modelling the contributions of eccentric or
intermediate-mass black hole binaries to the GW background, to consolidate the
prospects to perform precision cosmology with primordial GW backgrounds.
