Below are a few tips to help you break a bad habit, based of Jeremy Dean’s book: Making Habits, Breaking Habits.

Be mindful and understand when, how, and where you are performing the bad habit – and then avoid those situations.

Create ways to shake yourself from habitual behavior. I.e.: if you want to give up smoking, put your cigarettes in an unusual place. This way, you are forced to actively consider your actions and are better able to avoid the habit.

Have distractions ready for when you are tempted to perform the bad habit.

Avoid trying to suppress thoughts of the bad habit. The more you try to push it out of your mind, the more it will pop up, and the more likely you are to cave to the pressure.