I was always slightly mystified by the process of actually opening and closing barrels until I researched this post. The next picture shows the anatomy of a tight (liquid containing) barrel. The barrel would be filled with liquid through the bung hole. When filled, a wooden plug known as a bung would be hammered into the bunghole, sealing the barrel.
To open the barrel, you would tap the stave next to the bung stave with a mallet called a bung starter. The bung would pop right out. In days of old, bartenders also used bung starters on the heads of unruly customers. Many barrels also had holes drilled in the ends that accepted faucets, beer taps, etc.
To open a barrel holding dry goods, known as a slack barrel, you took off the head hoop and tapped the head down into the barrel. Many users didn't care about the resale value of the barrel and just chopped the barrel head out with an ax. In other uses, such as carrying apples from a farm to a processing plant, the top end of the barrel was left open.
Although barrel production continued to increase through the early 20th century, wooden barrels slowly lost out to more specialized containers as transportation improved and became more mechanized. Examples are wooden baskets for fruit, tankers for oil, bulk shipment for cement, cans, bottles, boxes and bags for food.
Wood barrels held their own through the 1940s, but by the end of the 1950s few commodities still shipped in wooden barrels. With the rise of the self-service grocery store, consumers saw packaged goods not barrels. Industry likewise went to other cheaper and less fussy packages.
High quality liquors and wines are still aged in charred oak barrels, some of which make their way to Chicago. Corrosive foods such as pickles were produced in wood until plastic drums came along. Wooden kegs are still a great way to ship nails and horseshoes, but nowadays both come in boxes. However, I did see new looking kegs of horseshoes a few years ago in a remote eastern Oregon store.
Despite the huge historical importance of barrels in enabling industrialization and commerce, sources of information are rare. Franklin Coyne’s The Development of the Cooperage Industry in the United States: 1620-1940 is good, but small and only available through Interlibrary Loan. Chicago Public Library owns The Cooperage Handbook which gives an interesting snapshot of the industry in the 1940s. The Cooper and His Trade from 1971 is more British. Aside from that, the Government Publications Department has scattered statistics on the cooperage industry, and there are a few publications available in the Internet Archive and HathiTrust.