Bhagavad Gita 3.4

न कर्मणामरंभन्नैष्कर्म्यं पुरुषोऽश्नुते |
न च संन्यासदेव सिद्धिं समधिगच्छति

Translation

One cannot achieve freedom from karmic reactions by merely abstaining from work, nor can one attain perfection of knowledge by mere physical renunciation.