How to remove all the existing explicit accounts and replace with the new accounts?

The Grant Permissions feature allows you to remove all existing accounts that have explicitly assigned permissions for shares and replace them with the selected accounts and permissions. Note that this will not remove inherited permissions from parent folder.

Click on button.

The Grant Permissions window will be displayed.