A glitch has recently been discovered in Fallout 4 (among the many), but this is one of the ones that will allow you to heavily exploit the game in your favor, clearing out the cap supply of any vendor that sells ammo.
The glitch was recently posted onand has been confirmed to work by several sources. So if you don't have any problem with exploiting your Fallout 4 experience and raking in absurd amounts of legal wasteland currency, here's how it works. Keep in mind the glitch has to be exploited via a vendor that sells ammunition.
1. Go to a vendor and buy all of one type of ammo. (Ex. If they have .308(67) buy 67).
2. Sell only one ammo back.
3. Then sell any amount of the ammo that does not result in zero ammo after the sell.
The included video shows the exploit in action.
If done correctly, you will continue to sell phantom packs of ammo without actually losing any of your stock. You'll only be able to score as many caps as the vendor has, but you can certainly use the exploit to buy anything you feel like buying from them using their own caps. You'll be a baron (albeit undeserved) before you know it, or until Bethesda patches this little glitch away.