See the following article for more information:
The REVOKE Permissions command allows you to reduce permissions of users by removing the indicated role from the current folder or subfolder. This includes all dataset shares in the indicated folder or subfolder, but excludes any permissions granted by team shares.
To fully remove a user from the folder, use the REVOKE ALL command.
REVOKE <EDITOR|VIEWER|ALL> ON <"folder|path" | HERE> TO "email1", "email2"
REVOKE EDITOR ON HERE TO "email@example.com", "firstname.lastname@example.org"; REVOKE VIEWER ON "Path|To" TO "email@example.com", "firstname.lastname@example.org"; REVOKE ALL ON "Path|To" TO "email@example.com", "firstname.lastname@example.org";