Best way to erase/regenerate database without wiping the settings?

If I want to erase and then have plex recreate my media database, is there a way to do this without wiping my settings as well? If I just erase my library path it erases both the data/settings. Is there a way to keep my settings?

Which settings do you expect it to keep?

Delete each library from Plex should do what you are after.
But of course, you have to re-create them, which means you have to at least make a screenshot of all the libraries’ properties.

Desire to keep: All the various PMS settings, transcode options, port settings for router, etc. etc.

Yes, these will be retained if you just manually remove all the library sections.