Actually hammering a jagged edged spike of iron into a vent was not something that occurred during the rout described in the header of this thread. There were, however, some quick & dirty ways to disable, i.e. spike the gun.
Throwing away the caps holding the trunnions in place was quick & easy. Additionally, if the unwitting infantry fired the gun, the resulting recoil would have been very amusing.
Dropping the priming wire into the vent & then bending it over with the sponge rammer was easy-peasy. I saw this happen during an aptly named awkward squad training drill. It was surprisingly awkward to remove.
Simply loading a couple of cannon balls or rifle bolts quickly & effectively spiked the gun. If time allowed, driving a wooden wedge home to jam the rounds with the sponge rammer was even more effective.
Of course, spiking the gun was the last thing on the mind of artillerists who were being overrun. On Missionary Ridge it was a 12 pound ball smashing down the door of his HQ that alerted Bragg to the rout. It was fired by jubilant infantry who used muzzle flash to set off the charge. An over excited soldier discovered that cannon became sizzling hot when he jumped astride the barrel. You could say that both he & Bragg found themselves in the hot seat.
It wasn't hard to un-spike a bronze gun. The brass vent had to be replaced on a regular basis. Unscrewing it & putting in a new one would have been easy.
On an iron gun the spike could be removed one of three ways. It could be drilled out. Alternatively, the spike could be drilled & tapped. A screw with a loop could then be used, along with some oil, to get a purchase to pull it out. A punch could drive the spike down into the breech.
At Franklin a young attacker attempted to spike a cannon by jamming a broken fence rail into the muzzle.
That did not end well for him.