Sorry, but it just doesn't work that way.
You see, you can't just stop a nasty habit. If you just stop, then you would leave a void in your life that you would quickly fill up with something else. Usually, you would fill that void with the same nasty habit.
So, instead of trying to "kick the habit," try replacing your bad habit with a good one. Focus on adapting so many good habits that the one bad habit you have would be pushed aside.
It's better to PUSH AWAY the habit than simply stopping it. Think about a car. If that car runs out of gas, you could simply put more gas in that car. But if you pushed the car off the cliff with a better car...well...that old car is GONE. It's broken in pieces! The same thing with your habit: if you just stop it, you could always put more gas to re-start that habit. But if you PUSH that habit off the cliff with better habits, then that nasty habit is GONE.
The point is to fill your life with so many good things that the bad things would have no room to thrive. The good things would push out the bad things to the point that those bad things become a memory.