The integration of ferroelectric materials into oxide electronics requires accomplishing deterministic polarization configurations. Since ferroelectricity often arises during epitaxial growth, the electrostatically rich environment in the deposition chamber renders control over the pristine polarization, however, notoriously difficult. Here, we address this challenge by directly accessing the polarization of fully strained Pb(Zr0.2Ti0.8)O3 (PZT) films during pulsed laser deposition using in-situ optical second harmonic generation. We show that tailoring the epitaxial growth conditions provides a direct handle to manipulate the pristine out-of-plane polarization direction of ferroelectric thin films inside the growth chamber. Specifically, for PZT films growing with an upward-oriented polarization, we find that an increase of the growth temperature and/or the oxygen partial pressure induces a reversal towards a downward-oriented polarization upon growth completion. In contrast, films growing with a downward-oriented polarization remain unaffected by variations in the growth conditions. In conjunction with ex-situ piezoresponse force microscopy and X-ray diffraction measurements, our in-situ experiments suggest the temperature- and pressure-dependent accumulation of positively charged Pb defects near the film surface as the responsible mechanism behind the polarization control in the PZT films.