Caramelized onions will keep in a covered container in the fridge for up to 2 weeks, or they can be frozen for up to 3 months. If freezing, you can divide them into small containers or freezer bags to thaw and use as needed.