  The density of the ambient medium where the supernova remnant evolves is a
relevant parameter for its hydrodynamical evolution, for the mechanism of
particle acceleration, and for the emission at TeV energies. Using XMM-Newton
X-ray observations, we present a study of the ambient medium density of the
historical supernova remnant SN 1006. We modelled the post-shock thermal
emission to constrain the ambient medium density. Our study is focused on the
North-West and the South-East rims of the remnant, where the thermal emission
dominates. We used a plane-parallel shock plasma model plus another component
for the ejecta that are not negligible in the regions of our study. The
importance of the synchrotron component is also studied. In order to improve
statistics, we combined several observations of the remnant.
  The density found in the South-East rim is low, roughly 0.05 cm-3, and seems
to be representative of the rest of the remnant. However, in the North-West rim
(close to the bright optical filament), the density is significantly higher
(about 0.15-0.25 cm-3). This confirms a picture of SN 1006 evolving in a
tenuous ambient medium, except in the North-West where the remnant has recently
encountered a denser region.
  A density this low is compatible with the non-detection of the remnant by the
HESS gamma-ray observatory. The lower density in the South-East implies a
higher shock speed of 4900 km/s, higher than that of 2890 km/s measured in the
North-West. This new estimate of the velocity could increase the maximum energy
that accelerated particles can reach to energies of about 1 PeV.
