Manual:RemoveUnusedAccounts.php

removeUnusedAccounts.php is a maintenance script. An unused account is one which has no edits, no deleted edits, no log entries (34581), and no current/old uploads.

Invocation
php maintenance/removeUnusedAccounts.php [--help][--delete] Running it without any parameter will only list all unused accounts, giving a total at the end. To really delete the accounts, run it again with the parameter --delete.

Warning
By default, this script deletes recently created accounts if they've existed for at least a day and never been used. Use the  (number of days) option to change this.

A full list of options is available with.

In some now-obsolete Mediawiki versions (before ignore-touched was introduced), this script deletes all unused accounts regardless of age. To avoid this, apply the patch suggested on the discussion page.