If a device loses connection while being deprovisioned, might fail to be unmanaged despite being removed from the MDM server. In such a case, the user can either use iTunes or Apple Configurator to restore the device. Restoring devices using iTunes or Apple Configurator ensures that not only the data and settings are wiped, it also re-downloads iOS into these devices.
Follow the steps given below to restore the device using Apple Configurator.
Follow the steps given below to restore devices using iTunes.