Vanvas
Vanvas (, ) is a Sanskrit term meaning residence (vās) in a forest (van). While it can be undertaken voluntarily, it usually carries a connotation of forced exile as a punishment. It commonly figures as a harsh penalty in ancient Hindu epics (such as the Ramayan and Mahabharat) set in a time, thousands of years ago, when much of the Indian subcontinent was a wilderness. When vanvas is self-imposed, it can imply seclusion from worldly affairs to focus on spiritual matters, as in the case of ashrams (hermitages) established by ancient rishis. When imposed as a punishment, it carries an implication of enforced isolation from society and exposure to life-threatening extreme  situations (the elements and wildlife). Vanvas of different people in the Hindu epics
Ramayana* 
Rama had gone to Panchavati (present day) Nashik for vanvas for 14 years with his wife Sita and younger brother, Lakshmana. They had been forced by their stepmother, Kaikeyi to go there as she wanted her son, Bharata to be the King of Ayodhya after their father's rule, Dasharatha. Hence, to maintain the integrity of Dasaratha, Rama chose to go to the jungles. Mahabharata*
The Pandavas and Draupadi were thrown out of the kingdom Hastinapur by their cousin Duryodhana and his uncle Shakuni after they lost in a game of dice with them and their common wife, Draupadi was humiliated in the court before the elders. References

Sanskrit words and phrases