I would start by getting a list of all the accounts with zmprov and output those to a file with
Then loop through each with zmmailbox with something like:
zmprov gaa > /tmp/allaccounts
You should definitely test with a subset of accounts before running over the whole mailbox. Note that in the script I wrote I echoed the zmmailbox commands to a file instead of executing them directly. This allows you to look through and make sure the feed looks right or to remove accounts you don't want to touch prior to executing it.
for ACCT in $(cat /tmp/allaccounts)
echo "zmmailbox -z -m $ACCT df \"$DELFOLDER\"">>/tmp/deletefeed
Note that you can try this interactively too to ensure you have the right paths set up. run
you will then be at the zmmailbox prompt. You can get a list of all folders with "gaf" or getallfolders and then do df or deletefolder "/Path/to/folder".
zmmailbox -z -m account_you_want_to_test