  We revisit the decoupling of neutrinos in the early universe with flavour
oscillations. We rederive the quantum kinetic equations which determine the
neutrino evolution based on a BBGKY-like hierarchy, and include for the first
time the full collision term, with both on- and off-diagonal terms for all
relevant reactions. We focus on the case of zero chemical potential and solve
these equations numerically. We also develop an approximate scheme based on the
adiabatic evolution in the matter basis. In fact, the large difference between
the oscillations and cosmological time scales allows to consider averaged
flavour oscillations which can speed up the numerical integration by two orders
of magnitude, when combined with a direct computation of the differential
system Jacobian. The approximate numerical scheme is also useful to gain more
insight into the physics of neutrino decoupling. Including the most recent
results on plasma thermodynamics QED corrections, we update the effective
number of neutrinos to $N_{\mathrm{eff}} = 3.0440$. Finally we study the impact
of flavour oscillations during neutrino decoupling on the subsequent primordial
nucleosynthesis.
