Sankhya Kārika
Karika 68
prāptē śarīrabhēdē caritārthatvātpradhānavinivr̥ttau। aikāntikamātyantikamubhayaṁ kaivalyamāpnōti ॥68॥
When time comes, it escapes from the body with a rupture as unmanifest material cause, the pradhana, withdraws itself. Having reached the goal that is both absolute and imperishable, it attains liberation.
How the purusha obtains final liberation, the kaivalya, is described here.