I think the Scripture actually speaks clearly on the matter…
1 Cor 5:3, for my part, although absent in body but present in spirit, have already, as if present, pronounced judgment on the one who has committed this deed,b 4in the name of [our] Lord Jesus: when you have gathered together and I am with you in spirit with the power of the Lord Jesus, 5 you are to deliver this man to Satan* for the destruction of his flesh, so that his spirit may be saved on the day of the Lord.
1 Cor 5:11 But I now write to you not to associate with anyone named a brother, if he is immoral, greedy, an idolater, a slanderer, a drunkard, or a robber, not even to eat with such a person.h 12For why should I be judging outsiders? Is it not your business to judge those within? 13God will judge those outside. “Purge the evil person from your midst.”
Mt 18 15 “If your brother* sins [against you], go and tell him his fault between you and him alone. If he listens to you, you have won over your brother. 16* i If he does not listen, take one or two others along with you, so that ‘every fact may be established on the testimony of two or three witnesses.’ 17j If he refuses to listen to them, tell the church.* If he refuses to listen even to the church, then treat him as you would a Gentile or a tax collector.