Spinach is a type of food that appears in select tins. Eating it will provide 600 nutrition [1] (much more than other tins) and will increase your strength: "This makes you feel like Popeye!" (or "Swee'pea", if hallucinating)

The amount of strength increase is as follows:[2]

Current strength Gain
18 or less
  • +1 (75% chance)
  • +1d6 (25% chance)
  • +1d10
18/85 or more
  • +1

Cursed tins of spinach contain a “decaying green substance”[3] which makes you lose the amount of strength you would otherwise have gained.

The use of Spinach and its effects in NetHack is a reference to comic strip character Popeye, who gains incredible strength after ingesting the vegetable.

Source code references[]