If you have the same roles set at all sites, this scenario will work for you:
– go to Network admin -> Users -> User Role Editor.
– delete selected role. This action will delete a role from the main site.
– click “Update Network” button. This will replicate roles list from the main site to all subsites of your network.
Users which had deleted role (e.g. ‘role_1’) on other sites will be shown by WordPress with role ‘None’. If you look at such user custom capabilities you will see ‘role_1’ between them though. If WordPress does not find some permission ID between roles, it counts that it’s a custom capability directly assigned to a user.
So if do not delete such capability from a user, user will get it as a role back in case a role with same ID will be added to a site later.
It’s a current state. I see that some enhancement are desired here.