One may open cans on Shabbat in order to eat the food inside them. Since cans are disposable and meant for single use, they are not considered true receptacles and are more akin to shells that are broken to get at the nut within.
Similarly, we read in the Mishna: “One may break a barrel in order to eat the dried figs inside it, as long as he does not intend to create a receptacle” (Shabbat 146a). Many explain that this mishna refers to a mustekei, an inferior sort of barrel meant for a single use. Because the barrel was unimportant, it was secondary to the food inside it, just as a nutshell is secondary to the nut inside it. Thus, one may break the barrel in order to eat its figs. They would not break the barrel in a way that scatters the figs; rather they would break off the top, and the figs would remain within for several days, until they were all eaten. The Sages did make one condition: “As long as he does not intend to create a receptacle.” If one makes a neat opening and plans to reuse the barrel to store other things, then he is truly creating a receptacle when he opens it, and is thus transgressing (SA 314:1).
The same applies to cans. One may open them on Shabbat if one plans to eat their contents, even if it will take several days to finish the food. Once the food is finished, the can is thrown out; therefore it is considered unimportant and may be opened on Shabbat. However, one who intends to reuse the can for other items may not open the can on Shabbat, since he is creating an opening and rendering it usable, which amounts to creating a receptacle.
Some are stringent and do not open cans on Shabbat even when they intend to throw them out. Since the can is in fact capable of storing additional items, creating an opening for it essentially makes it into a receptacle (Ĥazon Ish 51:11). However, in practice the halakha follows the lenient position. Since we are dealing with cans and containers that are designed to be disposable, it is not forbidden to open them. Those who wish to be stringent should open cans before Shabbat. If they need to open a can on Shabbat, they should immediately empty it of its contents.
. Along the same lines as the dispensation quoted in the mishna above, a beraita cites R. Shimon b. Gamliel as stating: “One may bring a barrel of wine and chop off the top with a sword” (Shabbat 146a). This is because the person does not intend to make a neat opening. He simply wants to get to the wine. This is the ruling of SA 314:1 and 314:6. However, Rishonim disagree regarding the type of barrel to which the dispensation applies. Tosafot and Rosh understand that the dispensation refers to a mustekei barrel, which broke and was then put back together using tar. In contrast, Ran maintains that even a high-quality barrel may be broken in order to reach the food inside it. This would also seem to be the opinion of Rambam (MT 23:2). SA 314:1 is stringent like Tosafot and Rosh. In any event, even according to the more stringent opinion, today’s cans would not be considered better than the mustekei barrels of the Talmud, which were meant to be used only once. For example, the mustekei barrel that was broken open could not be reused. In order to store dried figs or wine in the barrel, its top would have to be reattached.Ĥazon Ish 51:11 is concerned that a can becomes a receptacle upon being opened. If so, opening it is not breaking it but rather creating a receptacle (kli), because it can now be used repeatedly. However, many maintain that the can was already a kli prior to being opened, as in fact it preserved the food within it (Tehila Le-David 314:12). Opening it thus destroys it, as it can no longer be used. Even if, 60 years ago, many people used cans to store nails and the like, today almost no one does this (Or Le-Tziyon 1:24). Those who are lenient here include R. Shlomo Zalman Auerbach (SSK 9:3 and Shulĥan Shlomo 314:5); Minĥat Yitzĥak 4:82; R. Ovadia Yosef (Halikhot Olam vol. 4, p. 250); and R. Mordechai Eliyahu. However, in order to avoid the problem raised by Ĥazon Ish that one might be creating a receptacle, some suggest puncturing the bottom of a can before opening it. Then, when it is opened, it does not become a receptacle because there is a hole in the bottom (SSK 9:3). On the other hand, many who follow Ĥazon Ish feel that one may not even make this first hole (Minĥat Ish 17:3). Additionally, those who feel one may open a can should not make the hole because it is a destructive act, which is rabbinically forbidden. Moreover, sometimes puncturing the can may cause a violation of Borer. Thus, it is preferable to open a can in the normal way. One who wishes to comply with the stringent opinion as well should open cans before Shabbat, or at least empty them out immediately after opening them.