When trying to remove bad habits a good technique is to stop doing whatever it is you do that is associated with that bad habit.
For example for smokers who want to quit smoking they will have to quit drinking coffee as well because they are used to having coffee with a cigarette.
For people trying to lose weight it could be such things as:
- movie and pizza night. Maybe do an activity or board games or something that is not movies.
- going out with friends and having drinks/eating. Go out with different friends who do different activities
- watching tv at night and snacking. maybe read a book or take up a new hobby
These are just examples but I’m sure you get the point. If you find that there is certain things that trigger you to blow your diet or are bad for your health then really try to remove that activity and replace it with a new one.