You can’t. Desire and aversion disappear “of their own accord” (to be overly simplistic) after you train your mind to be so focused that it can “see” desire and aversion coming. Normally we look at a cup of coffee and immediately think either “oh, great! I love coffee!” or “coffee is addictive and bad for me and I can’t stand it.” When your mind is trained and still, there is a space or a time before those thoughts arise. That is where desire and aversion aren’t. Desire and aversion are delusions, and when you rest in that tiny space before they arise, the space gets larger and larger, until desire and aversion can’t capture your mind anymore.