You can create a script that bootstraps Q2A and removes the users (without the web server) using the internal user deletion function.
Something like this should work:
<?php
require_once '/path/to/q2a/qa-include/qa-base.php';
require_once QA_INCLUDE_DIR . 'app/users-edit.php';
$users = # here goes your logic to fetch the users
foreach($users as $user) {
qa_delete_user($user['userid']);
echo 'User deleted: ' . $user['handle'] . PHP_EOL;
}