Replace it with a positive behavior that serves the same purpose. For example, if you want to quit smoking, you could replace it with a healthier stress-relief method like exercise or meditation.