How do you best overcome the deeply ingrained bad habits and replace them with good habits? Consider a small example. One day a beautiful dog happens to come to your house; you do not know to whom it belongs. It is such an attractive thing, in order to keep it there for some time and enjoy its presence, you give it a little food.
Next day it comes about the same time, and again you feed it and enjoy having it visit you. In this way it comes back every day to get fed, and gradually over a period of time, attachment increases and this dog now regularly visits your house, spending more and more time there. One day you find that it will no longer leave; it just continues to live at your house from that time on. But the happiness that you enjoy in looking at physical beauty does not last very long.
Once the beauty is no longer accompanied by joy, it becomes obnoxious to you. In the case of this dog, you soon get tired of having it around all the time, and so you look for a way to get rid of it. To begin with you must ask yourself why that dog has attached itself to you and is now living in the house. The reason is that right from the very beginning you have been feeding it regularly every day; you have also been stroking it, playing with it, and paying so much attention to it. It is this repeated daily practice which has created the attachment between yourself and the dog.
Now you must develop a new regular practice, which will break this attachment and help you to get rid of the dog. For this the best method is to reverse the original process that created the attachment and made the object so dear to you