The theme being used is stored in the wp_options table in the database. Simply run these MySQL scripts and your site will be set to using the default theme (it’s based on the theme folder name):
update wp_options set option_value = ‘default’ where option_name = ‘template’
update wp_options set option_value = ‘default’ where option_name =’stylesheet’
Hopefully that’ll save you some time ripping your hair out if you stumble on a theme that trashes your admin.