You could try dumping the goblins' weapons from the stocks screen: don't blanket-claim, rather look into your stocks list, expand it (via [tab]) and scroll to the bottom, to the "forbidden" weapons. Claim and dump those by changing the flags in the stocks screen ("d" and "f"). This removes only the weapon from the goblin, nothing else. If you want to take away all their stuff, d-b-c, d-b-d is the better choice of course.
This only properly works when you have no (or at least few) other "forbidden" weapons on the map. This means you'll have to reclaim the weapons after dumping, or you'll just re-dump them over and over. In one fort, i had large stashes of forbidden weapons in various places, so ended up fiddling with "hiding" all the goblin cages after claiming and only dumping "hidden" weapons (which then needed un-hiding to avoid fouling up the display by themselves as well).
You really need some extra flags to help with specific dumping, since goblin equipment isn't distinguishable from loose gear - it's not listed as the goblin's property.
And since this hasn't been mentioned yet - a blanket dump command on all cages will _not_ release the goblins, since they're living creatures and not items. They must be removed from the cages by assignment to a pasture, chain or pit, or by opening the cage (usually by linking the built cage to a lever and pulling that). They can also be released accidentally (or "accidentally") by bringing the cage to the depot to sell it or in the case of metal cages by melting the cage.