I don’t think I’m qualified to suggest how to kick major vices like heroin and alcohol, but I have plenty of experience with minor vices like procrastination and time-wasting activities, both with myself and people I coach.
The fundamental first step that many people skip is determining why they want to eliminate a vice. That it’s not a “good” thing to do is never enough. If you don’t have a strong reason for quitting, you’ll never actually quit.
Sometimes good reasons may exist for quitting something, but they might not be obvious to you. So dig up and find both good reasons to quit and good reasons to continue. If you don’t examine both sides, you won’t trust your analysis.
If you can’t find sufficient compelling reasons to quit the vice, don’t bother trying. It’s better to table the idea than it is to try when failure is inevitable.