Ironically, I recently had to do just this. I had to reset WordPress admin password on a backup copy of an archived website, for which I had long forgotten the password. Since it was not a live site but only a local copy (i.e., running on localhost), I could not do the email reset. However, the stored password is hashed, so how is this supposed to work?
Fortunately, WPBeginner filled in the missing pieces on doing a password reset on a WordPress site running only on localhost:
Do you want to reset WordPress admin password on localhost? In this tutorial we will show you how to easily reset WordPress admin password on localhost.