The purpose of Yoga meditation is to steady the mind on the gradually advancing stages of thoughts towards liberation, so that vicious tendencies may gradually be more and more weakened and at last disappear altogether. But before the mind can be fit for this lofty meditation, it is necessary that it should be purged of ordinary impurities. Thus the intending yogin should practise absolute non-injury to all living beings (_ahi@msa_), absolute and strict truthfulness (_satya_), non-stealing (_asteya_), absolute sexual restraint (_brahmacarya_) and the acceptance of nothing but that which is absolutely necessary (_aparigraha_). These are collectively called _yama_. Again side by side with these abstinences one must also practise external cleanliness by ablutions and inner cleanliness of the mind, contentment of mind, the habit of bearing all privations of heat and cold, or keeping the body unmoved and remaining silent in speech (_tapas_), the study of philosophy (_svadhyaya_) and meditation on Is'vara (_Is'varapra@nidhana_). These are collectively called _niyamas_. To these are also to be added certain other moral disciplines such as _pratipak@sa-bhavana, maitri, karu@na, mudita_ and _upek@sa_. Pratipak@sa-bhavana means that whenever a bad thought (e.g. selfish motive) may come one should practise the opposite good thought (self-sacrifice); so that the bad thoughts may not find any scope. Most of our vices are originated by our unfriendly relations with our fellow-beings. To remove these the practice of mere abstinence may not be sufficient, and therefore one should habituate the mind to keep itself in positive good relations with our fellow-beings. The practice of maitri means to think of all beings as friends. If we continually habituate ourselves to think this, we can never be displeased with them. So too one should practise karu@na or kindly feeling for sufferers, muditaor a feeling of happiness for the good of all beings, and upek@sa or a feeling of equanimity and indifference for the vices of others. The last one indicates that the yogin should not take any note of the vices of vicious men.
When the mind becomes disinclined to all worldly pleasures (_vairagya_) and to all such as are promised in heaven by the performances of Vedic sacrifices, and the mind purged of its dross and made fit for the practice of Yoga meditation, the yogin may attain liberation by a constant practice (_abhyasa_) attended with faith, confidence (_s'raddha_), strength of purpose and execution (_virya_) arid wisdom (_prajna_) attained at each advance.