BG Chap 16 - Giving up lust, anger and greed
The person, who is free from these three gates leading to darkness, acts in the best interest of the self, and gradually attains the supreme destination. He performs the most beneficial practices, such as actions according to his āśrama, and attains liberation. In the Vedic literature, the ways of action and reaction are prescribed to enable one to come to the stage of purification. The whole method is based on giving up lust, greed and anger. By cultivating knowledge of this process, one can be elevated to the highest position of self-realization; this self-realization is perfected in devotional service.
One cannot give up the three gates to hell without practice of his own dharma or āśrama. And practicing one’s own dharma cannot be properly fulfilled without following scripture. The direction of the śāstra is given to the different castes and orders of human society. Everyone is expected to follow these rules and regulations. If one does not follow them and acts whimsically according to his lust, greed and desire, then he never will be perfect in his life. In other words, a man may theoretically know all these things, but if he does not apply them in his own life, then he is to be known as the lowest of mankind. Therefore one should act according to scripture to give up lust, anger and greed.