The Blue Elephant Principle
|cc image: JAM Project stencil: M MNMarz|
Child A: I know something you can't do.
Child B: What?
Child A: Don't think of a pink elephant.
Child B: ...
This turns out to be quite difficult, if not impossible. Not doing something, not thinking about something, noticing the lack of something is simply not what we were designed to do.
An evolutionary psychologist would tell you that spotting an approaching predator would have given our ancient ancestors an evolutionary advantage whilst seeing the lack of a predator would not have given any such advantage. A Zen Buddhist would tell you that this may be possible (with a lifetime of practice and meditation) and that the ability to perceive nothingness is the path to enlightenment.
But there is a trick to doing this - changing what you need to not think about slightly: thinking of a blue elephant.
This principle holds some truth for other behaviour: asking someone to stop doing something is asking the impossible. So try to find the most similar behaviour that would suffice and do that.