You’ve probably heard that pre-cutting vegetables, like celery and pepper strips, and keeping them at eye level in the fridge makes you more likely to grab them. That’s true, and a great tip. But when it comes to maximizing the nutritional value of your produce, other rules come into play. “In general, the longer food is stored in the fridge, freezer or cupboard, the greater the nutrient loss,” says registered dietititan Patricia Bannan, RDN, author of Eat Right When Time Is Tight. “Air, light and heat all hasten nutrient loss, especially with vitamin C, folate and thiamin.” That’s also why farmers’ markets are such a great source for fresh produce—the veggies haven’t been schlepped across the country or over oceans in unrefrigerated containers, losing nutrients along the way. In a study from Pennsylvania State University, fresh spinach retained more nutrients when stored at cooler temperatures than warmer temperatures. And even in a crisper cooled to 39°F, the greens held onto only 53% of their folate after eight days. Next time you unload your grocery bags, use these storage tips to preserve safety, quality, nutrients, texture and flavor. Start by setting your freezer below 0°F, and your refrigerator below 40°F. Spinach, broccoli, carrots and salad greensKeep them in the vegetable crisper of your refrigerator at the coldest possible temperature without freezing them. If your fridge will let you, set the humidity of the drawer high, since moisture helps retain nutrients, or consider wrapping carrots and celery tightly in plastic to lock in the moisture. Onions, squash, potatoes, and other root vegetablesMoisture is not their friend. This produce likes to keep cool but doesn’t need refrigeration if you have a dark, dry cupboard that isn’t near a heat source. Also consider storing an apple with your potatoes to prevent sprouting. In an experiment by America’s Test Kitchen, russet potatoes stored without an apple sprouted in their bags within five weeks, whereas taters stored with an apple stayed firm and sprout-free. MORE: 23 Ways To Eat Clean Herbs Photo by Olga Miltsova/Getty Images They’ll be fine in a vase on the counter if you’re going to use them within a few days. Otherwise, wrap the roots in a wet paper towel in the fridge to maximize moisture. Refresh the water regularly. Nuts and nut buttersIf you’re not going to eat them within a few weeks, store them in the fridge for a year or more or in the freezer for up to 2 years to maintain the natural oils and keep the ingredients in the nut butters from separating. Shelled nuts absorb more moisture and external flavors, so pack them in clean, dry, air-tight packaging. Fruits Photo by Martin Poole/Getty Images Ripen fruits at room temperature; then use them immediately or refrigerate them to halt further ripening. (If possible, keep them in a separate crisper drawer from the veggies, because fruit emits a natural ethylene gas that will ripen everything faster.) For example, this “off-gassing” ripens bananas—and you can slow it by wrapping the stems in plastic wrap. When avocado (technically a fruit!) overripen and develop brown spots, they’re not only less delicious, but also slightly toxic: The bruises contain mold toxins and histamine. BerriesA quick bath in diluted vinegar (one part vinegar to three parts water), which is a natural disinfectant, will keep your berries from developing that moldy film that gets them dumped in the trash. Just be sure to dry them thoroughly and store them on a paper towel in a breathable container in the fridge. Eggs Photo by malerapaso/Getty Images Store them in the original carton on the top shelf of the fridge, where it’s coldest, instead of in the plastic holders in the door, where the warmer temperatures send them South faster and the frequent jarring compromises their structural integrity (the twisted strands of protein on either side of the yolk will literally break). (Check out 6 more things you need to know before you eat your next egg.) Whole-grain flourThis pantry staple belongs in the freezer, at least for several days after you buy it. Freezing kills off weevils and insect eggs and also keeps sunlight from spoiling the flour. Yes, flour can spoil. Just keep it tightly sealed, like in a zippable plastic bag, to keep the flour from picking up odors from its neighbors. OilsEspecially if they’re low in saturated fat—think canola, safflower and olive—oil can get rancid at room temperature if you don’t use them within a few months. And rancid oil is no joke—it can contain toxin compounds associated with neurological trouble and cancer. Consider storing bottles in the center or upper shelves of your fridge to keep them from developing off flavors (just let them sit for a few minutes before using and they’ll come up to room temp and a normal consistency). For more info on safe, healthy storage, consult the FDA’s handy storage chart. MORE: 25 Foods You’ve Probably Been Storing Wrong Your Whole Life