Symptoms
- “The iPhone could not be restored. An unknown error occurred (4013)” during update or restore.
- The progress bar stops partway and the device reboots to Recovery.
- It fails at the same point each attempt.
What causes Error 4013 / 1008F
- A worn or non-certified USB cable, or a flaky port or hub.
- Antivirus or VPN software interrupting the USB connection.
- Not enough free space on the Mac or PC to stage the firmware file.
- A software fault serious enough that a normal restore cannot complete.
How to fix it
- Use an Apple-certified USB cable plugged directly into the computer (no hub), ideally a different port; try a different computer if you can.
- Free at least 15 GB on the computer and quit VPN and antivirus software, then retry the restore in Recovery Mode.
- If it still fails at the same spot, put the device in DFU mode and restore from there.
Terminal / CLI command
sudo purge
Optional, on macOS — frees inactive memory before a large restore. Not required.
Prevent it from coming back
Keep a known-good Apple cable for restores, and keep 15–20 GB free on the computer you sync with.
