Is it wrong of me to tell him they can’t be friends anymore?

Hey y’all, so my boyfriend has this friend. They’ve been friends for probably going on 10ish years. Anyways, this friend is going nowhere in life. He doesn’t work and he just does hard drugs and drinks all the time. He always tried to encourage my boyfriend to cheat on me also. He tells him to get hookers and download dating apps for hookups and what not. My boyfriend has told me he completely understands why I’d be upset and that if I don’t want him to, he won’t talk to him anymore. I haven’t told my boyfriend not to be friends with him because I feel bad. Also, my boyfriend has cheated on me before. We’ve been trying to work things out and this friend is making it more difficult. I understand it’s not the friends fault that I was cheated on but it definitely makes it a little more difficult to work on things with my boyfriend. (We live together)