We can be free from a bad habit just only we can replace that habit with another new habit. In other word we say that a habit can only be lost if there is a new habit come.
Many people have found it was difficult to put bad habits out. Let me tell you, all the successful leaders in the world experienced, a habit will never be lost if there is none to replace it.
So if you want to put the bad habit out, simply doing other habits that stronger enough to take a place in your mind.
In many practices, it took more than 3 months continuously doing a new habit to make it stronger enough.
Get habit guide here.