As far as I know, Moodle core itself does not have such a feature. You may want to try https://moodle.org/plugins/local_multiple_enrollments (found by searching "unenrol" there).
Roles and permissions
Bulk un-enroll
This discussion has been locked so you can no longer reply to it.