Context. The molecular gas composition in the inner 1 kpc disk of the starburst galaxy M 82 resembles that of Galactic Photon Dominated Regions (PDRs). In particular, large abundances of the reactive ions HOC + and CO + have been measured in the nucleus of this galaxy. Two explanations have been proposed for such high abundances: the influence of intense UV fields from massive stars, or a significant role of X-Rays. Aims. Our aim is to investigate the origin of the high abundances of reactive ions in M 82. Methods. We have completed our previous 30 m HOC + J = 1 → 0 observations with the higher excitation HCO + and HOC + J = 4 → 3 and 3 → 2 rotational lines. In addition, we have obtained with the IRAM Plateau de Bure Interferometer (PdBI) a 4 resolution map of the HOC + emission in M 82, the first ever obtained in a Galactic or extragalactic source. Results. Our HOC + interferometric image shows that the emission of the HOC + 1 → 0 line is mainly restricted to the nuclear disk, with the maxima towards the E and W molecular peaks. In addition, line excitation calculations imply that the HOC + emission arises in dense gas (n ≥ 10 4 cm −3 ). Therefore, the HOC + emission is arising in the dense PDRs embedded in the M 82 nuclear disk, rather than in the intercloud phase and/or wind. Conclusions. We have improved our previous chemical model of M 82 by (i) using the new version of the Meudon PDR code; (ii) updating the chemical network; and (iii) considering two different types of clouds (with different thickness) irradiated by the intense interstellar UV field (G 0 = 10 4 in units of the Habing field) prevailing in the nucleus of M 82. Most molecular observations (HCO + , HOC + , CO + , CN, HCN, H 3 O + ) are well explained assuming that ∼87% of the mass of the molecular gas is forming small clouds (A v = 5 mag) while only ∼13% of the mass is in large molecular clouds (A v = 50 mag). Such a small number of large molecular clouds suggests that M 82 is an old starburst, where star formation has almost exhausted the molecular gas reservoir.