Refrigerate for Up to One Week
Garlic website A Touch of... says roasted garlic will last for about a week in the refrigerator if you coat the cloves (or pulp) with olive oil and keep them in a small container, or store the whole piece of garlic in an airtight container.
Refrigerate Up to One Month
The website Care 2 Care claims that roasted garlic cloves can be stored in the refrigerator for up to a month if they're covered in olive oil and kept in a container with a tight lid.
For the best flavor, eat the roasted garlic within a week of refrigerating it. If you don't mind the garlic losing some of its freshness, keep it for up to a month.