A Dynamic Component Template is linked to a Schema (which forms the links to Components based on that Schema).
By default when you publish a Dynamic Component Presentation (either by publishing a Component using the linked Schema in the CT, or by publishing one of the Dynamic CTs), the Publish Resolver will add all available DCPs to the Publish Transaction.
To change this behaviour (which I would reccomend against btw, since it is changing default behaviour and removing items which at some point, somebody might question why they are removed), the only option you have is adding a Custom Resolver (and that will need to determine to which target the publish action is, so that it can decide whether to remove some DCPs).
There is a list of some blogposts and a code example code of a custom resolver: