Henrik Edberg has an article listing nine steps to stop a habit. The short version is below.
1. Tell your friends and family.
2. Make it painful to not go through with it.
3. Listen to those who have gone where you want to go.
4. What will this lead to in 5 and 10 years?
5. Avoid temptations.
6. Replace it.
7. Don’t remove more than one habit at a time.
8. Don’t make a huge deal out of it.
9. If at first you don’t succeed dust yourself off and try again.