To list the users, you can simply do this in the ACP.
ACP > Users > Search for Users
Set the criteria for Last Visited Between to what you want (using the calendar picker to choose a date 6 months ago). Note that you should leave the first date box blank and do this in the second date box
If you want to amend the users in some way manually, you can do exactly the same thing using ACP > Users Batch Update Users. Once you have the list, you can apply various options such as changing usergroup, banning etc.
Something else you can consider, which would require an add-on, is using a user group promotion to give active users more options and less active users fewer options. I do this on my site based on number of posts made in a 30 day period - the more they post, the more secondary user groups they are added to with increased privileges. This is done automatically. If the post less or stop posting altogether, they are automatically removed from these secondary groups leaving them with just basic privileges. For this option, you could use either of these add-ons: