I have had one or two toxic friends in my life, and one toxic sister. I found the best way was to just let them go, don't contact them or seek them out, and if they contact you, be polite and civil, but give away nothing of yourself. If you constantly refuse to visit them or you are always busy when they visit, they will eventually get the message.
It was really hard to do this with my own sister, but for me it was a matter of having to rather than wanting to.
The people who are toxic are not really our friends anyway, real friends don't do the things these toxic people do.