Caterpillar infested

I cut down my second plant and I hung it up to start drying when I noticed something crawling on it there was a Caterpillar and then Istarted breaking open nugs and there inthe middle of the fucking nugs little assholes how do I get rid ofthem after harvest or am Ijust going to have to do it by hand and tearthe thing to shreds