One way to eliminate a bad habit and cultivate a good habit is to change your environment, wholly or partly.
People are very sensitive to their environment and its culture – to the norms and expectations of the communities they are living in. We want to say the “right” things and act the “right” way. Because we instinctively try to “fit in” with the groups we identify with, the behaviors of other people are “contagious”.
Our environment acts on us by reinforcing or deterring our habits. So, to change yourself, you can try to change you habits. And since our habits are greatly influenced by our environment, then a change in the environment will often lead to a change in habits.
It's unrealistic to think that most of us can shift our environment drastically. But there are more practical ways to create a good habit. Even small environmental changes can make a significant difference. By changing the environment one can even force a new habit.
For example, many smokers find it easier to quit when they're on vacation, because at home, much of their environment is loaded with smoking associations. It's like trying to quit smoking inside a Camel advertisement – everywhere you look are reminders of the habit.
So, if you have a bad habit you want to eliminate, think of the ways in which your environment influence you, and then proceed to change what you can to reinforce the good habit you want to cultivate.
Heath, C. & Heath. D. (2010). Switch: How to Change Things when Change is Hard.