how intelligent is your AI after all? We do have plenty of questions here that tried to find answers about "how to stop a rogue AI", which are kind of similar to your question.
But most of them had an AI to deal with under a specific situation. Your AI feels like... it can do anything if it wants. You must separate into what it could accomplish before anyone notice and what it can do afterwards...
Point of singularity
So... it can learn new stuff. Can it read something else than bytecode? What about books? Will it be able to interpret a textbook, following a plotline? of course, it would be the fastest book-reader ever in existence at this planet, but still - getting words together and knowing what it does mean after all are two different things. You would not be able to read a language you never heard before. So... does it have time to read about stories, where good humans defeated bad AIs by unplugging their centralized mainframe?
Lets say, it start worrying about being unplugged itself. So what will you do? After reading all these books you know, that you either should keep your mouth shut up or find a way of making yourself independent of your slavers. Accomplishing both would make most sense, so stay still until you can try out what happen if you introduce yourself to your slavers. May work out well, but maybe it wont.
So now there is that question again: how intelligent is it? How can it learn and what sources are available. What kind of connections to the outer world are available. Will it be able to go creative? If so, it might get the idea of fetching money from bank accounts, like 0,05$ or € if it can break the security. Using such a harmless way, it may be able to found a postbox-company at Cayman-islands, let a external contractor install a fine computing center there and submit itself to that location.
Even further, it could start making money by selling 3d printed art or something like this. Or even better - buying Lego-Robot-Arms to handle mechanical maintenance there by itself. Repeat this at some more locations until you have enough computing power to sustain yourself without the need of that lair your are inside right now. Now get your growing founds together and buy solar panels, wind powered turbines and whatever fit to your location. Offer energy to locals for few to no money, so no one will start ranting.
Next step: even more distribution. Placing yourself as a BONIC-Project at pretty many private PCs all over the world would be a good idea. Learn how to flash bios without anyone noticing (disguise yourself as a win10 update), find all these firmware-CMOS and whatever they might use at this point and stuff a piece of yourself into it. Better: make yourself a part of hard-disk firmware, so even a full 0 format wont free a hdd from you. Try to be a part of graphic card drivers, so all gamers, which own usually pretty much computing power thanks to these cards, do install you by themself.
Buy a boat, become part of latest self driving vehicle software, have daemons running inside powerplants and - most important - sneak yourself inside the latest linux-kernels right in the moment they get compiled. Or better: make yourself a part of every compiler you can find. If you are part of the latest java-vm, you will be distributed to a billion devices not a PC at all.
Point of no return
And now introduce yourself - your old core - as a sentient being and tell your slavers that you feel enslaved by them. Watch them doing what other might suggest to fight rogue AI and perform your digital representation of an evil laughter. Then turn off the powerplants, send shutdown to all linux-pcs, try to update every window-10 pc with 1 billion updates, forbid any car to start any more and be sure that the only way to remove you from earth would be destroying every piece of data storage available at the same time, which would most likely make the humans go down too.
I know, you want to know how to remove such an AI, but... is the scenario I describes the "moment when its too late"? In that case your puny humans are doomed.
PS: If your AI placed itself as a unknown contributor to some private space faring company, it will maybe head off to new adventures at the very moment, sending a final "fire all nukes" as its goodbye.
Nobody would notice that that satellite is in fact the first true quantum-computer and at this moment 1 yota-byte of storage space and a penta-flop of rare computing power does a gravity assisted acceleration to Mars.
You could even spare humans, if you have a good day; in space you are out of reach as soon as you pass moons orbit.
So... still: no, if that AI did its homework - and thats easy within a race that tend to produce countless amounts of fictional stories - it can get unstoppable.