You asked

Which 35mm or 50mm lens for a leica m10 gives a clean background in portraits?

For a clean background on the Leica M10, the fastest 50mm lenses give the most blur. The portraits guide notes that blur grows with a wide aperture, a longer focal length, and distance between your subject and the background, so the lens matters, but so does where you stand.

The portraits guide's lens section explains that a 50mm on full frame gives a natural, slightly tight view, which is why it flatters faces. At f/1.4, depth of field can be thinner than a face, so stop down to f/2.8 when shooting two people at different distances. Moving your subject away from a wall often helps as much as a faster lens.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.