email – How to unsubscribe customers on mass / bulk in Magento 2.3


We have migrated from M1 to M2, and it appears on M1 we had customers “subscribed” in Magento admin but had subsequently unsubscribed in our email platform. Unfortunately, this had not synced back to Magento 1 and was one way. Therefore when moving to Magento 2, it began to re-subscribe customers that should be unsubscribed.

We have around 30k subscribers that need unsubscribing, which I can find in the newsletter_subscriber table and comparing to our email provider’s db.
However changing subscriber_status field in the db from 1 to 3 (subscribe to unsubscribe) does not appear to work, and I suspect a customer save also needs to happen, but not sure how to do this.

Any ideas, either to save all customers pragmatically, or to unsubscribe pragmatically?
I have a list of emails or subscriber_id’s and customer id’s