Unifi can't remove old APs

Hi

I am trying to remove old APs from controller but keep getting API errors

the APs are no longer on the network

controller is running on ubuntu 18.04 controller version is 5.14.23

Thanks

Eddie