You simply need to press Advanced Search and then filter it by those who have logged in within a specific period of time. That filters out all the "inactive" accounts for you.
There's really no need to delete people who are inactive. It would create unnecessary problems for example with forum topics, events etc started by people in the past which may or may not still be in use now.
So if you don't want to see them, simply fill in the search form correctly.
Cheers