This article originally appeared on All You.

By Julia Warren

We’ve all experienced it: You grab a recently-purchased container of strawberries out of the fridge and find it moldy. Or discover that the broccoli you want to use for dinner is now limp. Instead of getting caught off guard by ingredients that have gone bad, here are a few steps you can take to make your produce last longer:

1. Store cut carrots or celery in water.Cut vegetables quickly lose moisture in the fridge. Storing them in an airtight container with water will keep them crisp for up to a week.

2. Keep scallions in the freezer.Chop the scallions and keep them in an empty water bottle in the freezer. You can sprinkle some on a dish whenever you need them. Scallions stored this way in the freezer can keep for up to a year.

3. Wash berries in a vinegar solution.Wash the berries in 3 cups of water mixed with 1 cup of white vinegar. Drain and dry them completely (in a salad spinner or air-dried on a cookie sheet) and store them in the original container. The berries will last 1 to 2 weeks, and the vinegar solution will prevent mold from growing.

4. Cover herbs with a plastic bag.Store your herbs like flowers: upright in a glass with some water. Cover the top loosely with a plastic bag (to keep moisture in) and the herbs will keep much longer, for at least a week.

5. Store pineapples upside down.Twist off the crown (the leaves) and store the pineapple on the counter upside down. The sugar in the fruit tends to flow to the bottom during shipping, and storing pineapple upside down helps redistribute the sugar throughout the entire fruit.

6. Put onions in pantyhose.Hang your onions in an old pair of pantyhose with a knot in between each one. Put the onions in a cool, dry place. Separating the onions like this helps them aerate and last longer. Just cut off an onion each time you need one.

7. Wrap broccoli in aluminum foil to keep it crisp.When you get home from the grocery store, wrap your broccoli in a sheet of aluminum foil before placing it in the fridge. It will retain more moisture this way.

8. Stop potatoes from sprouting with an apple.Store an apple alongside your potatoes in the fridge to keep potatoes fresh for at least 8 weeks. Apples produce a gas called ethylene that will prevent sprouts from forming.

9. Use a cut onion to stop avocados from browning.Keep that half-avocado in an airtight container with a cut piece of onion. You won’t get the usual sliminess you see from using lemon juice, and the avocado will remain green for a few days. This trick also works with guacamole.

10. Keep ginger in the freezer.Not only will you always have ginger for your stir-fry whims, but keeping ginger in the freezer makes it easier to grate and helps it last longer (about 6 months). Store it in an airtight container.

11. Freeze peaches with orange juice.Cut up summer peaches and freeze them in airtight plastic bags with some orange juice. They’ll stay sweet for winter and the juice will prevent browning.

12. Store mushrooms in a paper bag.Keep your mushrooms in a paper bag in your fridge’s crisper drawer. The bag will cause better airflow that stops the mushrooms from getting too wet and slimy. They’ll stay slime-free for up to a week.

13. Place a damp paper towel on your lettuce.Store your lettuce in an airtight container or a bowl covered with plastic wrap with a damp paper towel. The towel will help the lettuce stay crisp.

Photo: Will Heap/Getty