Résumé : The transverse momentum (pT) spectrum of prompt D0 mesons and their antiparticles has been measured via the hadronic decay channels D0→K−π+ and D‾0→K+π− in pp and PbPb collisions at a centre-of-mass energy of 5.02 TeV per nucleon pair with the CMS detector at the LHC. The measurement is performed in the D0 meson pT range of 2–100GeV/c and in the rapidity range of