Inactive User Cleanup plugin has been updated recently for Moodle 2.8 & 2.9 versions. The Inactive User Cleanup plugin, which is maintained by Arindam GHosh and Dualcube Team, deletes inactive user accounts. This cleanup process runs with Moodle cron job.
Acc. to the plugin description:
In the first step admin user of the site setup days of inactivity and drafting notification mail for all users from the Site administration > Reports > Inactive User Cleanup
If an inactive user is found he/she gets a notification mail.
In second step if the user still has not accessed the moodle site within the time span which is mentioned in the notification mail. Then the deletion process starts. The particular inactive user account entry is removed with next run of this cleanup process which is automatically or manually run by cron process.
You can download the latest version of the Inactive User Cleanup plugin from https://moodle.org/plugins/view/tool_inactive_user_cleanup