Does (bad) karma have to be depleted to be able to attain enlightenment? This question came to me from over thinking the "Angulimala" story. He had to "repent" to some extent for the murders he committed, by being scolded an hit by stones. However, the effect of the karma seems to be quite mild for 999 murders and even the intention to kill the Buddha.

So my question is this: Does your karma have to be neutral or positive to become enlightened?
And if not, what happens to the negative karma after attaining enlightenment?
While some of the past karma may fruit as obstacles to liberation, not all karma has to fruit before liberation, as even Buddha himself famously experienced results of his past karma after his enlightenment (e.g. when Devadatta wounded the Buddha's foot with a rock).

As I explained in https://buddhism.stackexchange.com/a/1672/43 Buddha rejected the theory of intentionally "burning" past karma through exertion and austerity. Instead, liberation is achieved by "abandoning of unskillful mental qualities and the attainment of skillful mental qualities in the here-&amp;-now".

Basically, Buddha's advice to people of difficult backgrounds has usually been to leave the past in the past, and focus on the choices to be made and the state of mind to be maintained from now on.