The magnetic-field (B less than or equal to 7 T) effect on the cavity polaritons linewidth is studied by reflection spectroscopy at T=2-5 K. The structure under study consists of a single 160-Angstrom GaAs/AlAs quantum well (QW) embedded in a lambda-wide Al0.1Ga0.9As microcavity (MC) that is cladded by Al0.1Ga0.9As/AlAs distributed Bragg reflectors. The QW absorption abo re the QW band gap, E>E(e1-hh1), is flat and it transforms into a series of well-defined bands (Landau transitions or magnetoexcitons) under a perpendicularly applied magnetic field. This results in a narrowing of the MC mode by about 30% when E-MC>E(e1-hh1). We analyze the reflection spectra by using the linear dispersion model based on the transfer-matrix formalism and introducing the (e1:hh1)1S, (e1:lh1)1S excitons and the N=1 and N=2 interband Landau transitions as Lorentzian oscillators. The model explains well the reduction in the the mode linewidth, under the applied magnetic field, as due to the change in the absorption spectrum caused by the transformation from a two- to zero-dimensional electronic density of states. It is also found that the MC mode linewidth and intensity, in the spectral range E-MC<E(e1:hh1)1S, are strongly affected by below-band-gap residual absorption of the Al0.1Ga0.9As layers. [S0163-1829(99)08239-9].