Vegetables that are picked at peak maturity will last longer than underdeveloped or overripe vegetables. So, try to delay harvest for as long as possible, unless frost is coming or pests are threatening to decimate your entire crop.
Certain vegetables need to be cured in order to keep well in storage. This process dries and hardens the skin so your vegetables are less susceptible to premature rot.
If I wanted homegrown onions in December, for example, I wouldn’t grow Alisa Craig or Walla Walla, which have a shelf life of just a month. I’d go for an onion variety like Copra, which can last up to a year under optimal conditions!
Many fruits emit ethylene (a naturally occurring, colorless, and odorless chemical) as they ripen, and this chemical speeds up ripening for other produce as well, causing them to spoil sooner than they normally would.
The majority prefer temperatures between 32°F to 38°F for optimal keeping, though notable exceptions are sweet potatoes (which store best in warmer temperatures of 55°F to 60°F) and winter squash (which should be kept between 50°F to 55°F).