It really depends.
It's good to be giving love and attention and exercising your empathy and care for others even if they're not giving equally back, it makes you a better person anyways and gives you practice for future (hopefully better) relationships.
When you get too used to being on your own, it can be hard to re-adjust to having people in your life, it can also become easier to miss opportunities to meet anyone else
It's good to have people who might be willing to help you out or check in on you just in case something dire were to happen to you
Often you meet people through other people so... you might finally meet someone you really do like through one of these mediocre friends - though that does depend a lot on what kind of people they have connections to - if they're all like them, then probably not.
But if the relationships are becoming toxic to you, creating more stress and negative emotions than they do positive it may be better to distance yourself.
If you feel like they're being a bad influence on you in some way, you're probably also better off without them
It can be very freeing to be on your own with no-one who has preconceptions of who you are or roles you always seem to fall into with them. It can be a great experience of re-discovering who you really are when you're only concerned with what you feel like doing and what you think of yourself. It can help strengthen your own sense of self, your values and direction in life, to be away from relationships where you've taken for granted the way others expectations have confined you. But I wouldn't recommend staying alone forever - perhaps some people do thrive that way, but I think most people thrive even more if they can find good relationships.
It's really hard when the relationships you have aren't what you'd like them to be, but I guess you might ask yourself if you had some friends who really were the kind you'd like to have, would you be content keeping these other friends as more periphery secondary friends, or would you actually drop them completely? Just because one role isn't being filled in your life, doesn't mean the other side-roles that are full aren't worthwhile, but on the other hand if you're only talking to someone because there isn't anyone better it may just be distracting you from the hard work of finding someone more worthwhile.