How to keep site ids and codes AND reset DB?

I want to delete all old data and make new fresh DB but keep the site ids the same so I dont have to replace the code for each site. I have deleted some sited over the years and the lowest id now is 32. If I do re-install db and files It will start over with id 1. That will not work unless I go and replace all the codes for each site. Is there a way to do with out messing up the site #s?
I could add and delete 31 sites but looking for easier way.