Ties With Friends And Breaking Them
The hadith does not tell to keep the company. You can avoid the company and greet them when you see them help them when they need.