Nuke it from orbit - it's the only way to be sure
If you want to be really sure you destroy everything of the AI, you'll need to launch an EMP (ElectroMagneticPulse) from the orbit (there are different ways to achieve this, one would be an atomic bomb, but there are better ones). EMPs will destroy every electronic device it hits without causing really much damage to humans.
Also an interesting read on a similar topic: https://what-if.xkcd.com/5/
Especially this is gonna be interesting:
[...] nuclear explosions generate powerful electromagnetic pulses. These EMPs overload and destroy delicate electronic circuits. [...]
And nuclear weapons could actually give us an edge. If we managed to
set any of them off in the upper atmosphere, the EMP effect would be
much more powerful.