How to let go?

How do I let go of a toxic friend? I believe this person’s purpose was already served in my life. They are toxic but I can’t seem to accept the true colors they keep showing me. I believe there’s still good in them even tho they have showed me multiple times they are no good. What do I do? I feel stuck.