Post category slug issues

I have seen this on many sites including my own. I know the cause is from deleting a category then creating the same one again, hence the number 2 appears next to the category name (social-media-consultant-2). My question is, how can I eliminate this problem now. I was told I have to go into data base and remove from code? I know not to delete a category anymore, but I have others asking me to see if I can fix. I would appreciate your advice.