Thank you for your reply. That is quite easy and obvious and I have read those articles in my research. But both articles assume that certain roles have previously been assigned. I have thousands of users who registered over the years who have never signed in (and have questionable usernames and email addresses, likely spammers). All of these have the role “user” or “subscriber”. Not much help.
But the first article mentions using a plugin “Bulk Delete”. But there is a warning on the page that says it has not been tested for the 3 latest versions of WordPress.
Additionally, all of the options are to delete posts of varying kinds. I want to delete thousands of users who have never posted. If someone has not even logged in for over a year I want them gone.
Is there a database query that might perform this? (I have a staging website and can duplicate the database to test with first.)