Need to mass remove all unsubscription requests from server

Thanks in advance for any help!
I tried the steps in this post: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/2...
But I tried changing the 'pend-type' to 'unsubscription' and 'un-subscription' neither of which worked:
pendings = getUtility(IPendings) for token, data in pendings.find( ... token_owner=TokenOwner.subscriber, ... pend_type='un-subscription'): ... pendings.confirm(token, expunge=True) ... commit()
I would like to remove all un-subscription requests from all lists on the server.
Cheers

zachr@mta.ca writes:
I tried the steps in this post: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/2...
But I tried changing the 'pend-type' to 'unsubscription' and 'un-subscription' neither of which worked:
"removal" might do the trick.
I'm really pressed for time right now so I don't have a precise answer, but in the below, instead of confirming, you could remove the pend_type argument from pendings.find and print(repr(data)) instead of confirming the token. I'll bet that will find you the right pend_type.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

Hey Stephen,
If I print out all of the items in the 'pendings' variable I get this:
('d20b844e71d1de7743de2addbed33486a08c38fe', {'type': 'unsubscription', 'list_id': 'mailing.list.com' 'email': 'user@list.com', 'display_name': '', 'when': '2025-09-18T17:45:11', 'token_owner': 'moderator'})
so I think 'unsubscription' is the correct type.
participants (2)
-
Stephen J. Turnbull
-
zachr@mta.ca