How to remove DNP components from solder paste layer

Hi,

I’m designing PCB with some DNP components. I would like to have stencil, which does not contain all components. I have seen some recommendations to delete DNP components when generating file for stencil. I wonder if there is better way to generate stencil, which does not have DNP components?

I don’t know if there is an option for this. As a workaround you can define a rule area (without paste) over the DNP footprints. I’ve not tested it.

The only workaround I’ve found is selecting the DNP footprints pads one by one in the PCB editor and unchecking the F.Paste/B.Paste technical layer. This does not modify the footprint itself.

I wonder if there is better way to generate stencil, which does not have DNP components?

Not natively implemented in kicad at the moment. Maybe one of BOM variant plugins is able to help here.