Inhibiting bad habits through cultivation of good habits is the foundation of psychological transformation outlined in Yoga Sutra.
Sūtra 1.50 | tajjaḥ samskāro’nyah samskāra pratibandhī
Samskāra means latent impression or habit. According to the psychological model of Yoga Sūtra, everything we do or perceive leaves an impression on our mind. This Sūtra essentially states that latent impressions created through Yoga practices oppose or negate latent impressions that are not conducive to Yoga.
We know that repeated application of a particular pattern of behaviour makes it into a habit. Whenever we come across a familiar situation, we use habit patterns from our memory to deal with it. For example, we can walk while texting. The act of walking is a habit pattern and is executed without conscious awareness.
When we encounter a truly new situation, we guess and respond. If the our response enhanced our survival (in a broad sense), we are likely to repeat it when we face the same situation. In this context, ‘pleasure’ is a marker that we use to assess results. The more pleasurable the experience from a response, the stronger the impression that response leaves on our mind. Conversely, the more painful the experience, the less likely it will be employed in the same situation in future. Essentially, we are a walking bag of habits. This is all standard evolutionary neurobiology.
Habits are useful in that they save energy and computational time for the brain. However, convenience has its downside. When we are under the influence incorrect knowledge (in the form of biases, conditioning, fears, etc), we usually misread a situation. When we misread a situation, the response patterns we develop to those situations are not to likely be helpful. What was convenient and pleasurable at one point may not be so at other times. If we had encountered that situation frequently enough, the response pattern would have become entrenched and this pattern would be employed unconsciously in the future. However, circumstances may have changed and the response might actually be harmful to us. Think smoking or alcohol abuse.
So, what does this mean to us mortals? Often we go after bad habits. We battle with them, we make resolutions, we go on detox programs, we cajole the mind with a plethora cleverly worded statements (Internet is abound with 3 step plans to get anything done!), etc. Yoga recommends a positive approach. Sūtra 1.50 suggests that we focus on creating good habits instead of fighting the bad habits directly. These good habits gradually take up more of our attention. Since attention is a finite quantity, now there is less of it feeding the bad habits. The latent impressions created by the good habits will take the battle underground and spare us from the anxiety of having to fight with the mind. Once the good habits are firmly established, the bad habits get progressively weakened and die out.