Keep garlic from going bad by storing it in mesh bags or woven baskets, placing it in the fridge or putting it in the freezer. Additionally, drying out the garlic is a way to keep it fresh longer. If the garlic heads have flexible tops, you can braid them and hang them to dry.
The first step in keeping garlic fresher longer is to pick good-quality garlic when shopping. In general, avoid any soft, damaged or still-sprouting garlic bulbs as they rot more quickly than untainted cloves. If leaving the garlic out of the refrigerator, a temperature of 60 to 65 degrees Fahrenheit is ideal. If the temperature is too hot, the garlic dries up, shrivels and becomes very hard.
As garlic also prefers moderate humidity, storing it in the crisper drawer of the fridge is a good idea. Keep it there until just prior to using it as removing it causes sprouting to occur. Place any leftovers or chopped garlic in a covered plastic container. To freeze, mix the garlic with a little water in a blender, and then place the mixture into an ice cube tray. Once frozen, remove the cubes, and store them in the freezer in an airtight container.