Clear out pending push notifications

jhbush
Valued Contributor II

I had a few push notifications from Profiles that were removed, but they just never seemed to go away. This is a way to get rid of them:

Open a shell prompt

sudo mysql

Once at the prompt, type:

use jamfsoftware

Then type the command:

delete from mobile_device_management_commands where apns_result_status != 'Acknowledged';

5 REPLIES 5

Cem
Valued Contributor

Nice one! Do you happen to know how to push the ones saying pending but not applying?

jhbush
Valued Contributor II

Cem, this removes failed push notifications. Just make sure you have a backup.

delete from mobile_device_management_commands where error_code !='-1';

Emmert
Valued Contributor

Is anyone using this regularly, or is there a better way to do this now?

iPad_Sheriff
New Contributor III

BUMP

Felipe_hernande
New Contributor III

it's the way I have been doing this.