Melt the butter in a large heavy-bottomed pot or Dutch oven over medium heat.
Add the sliced onions and stir to coat in the butter. Cook for about 10 minutes, stirring occasionally until the onions begin to soften. Reduce the heat to low and stir in the brown sugar, vinegars, thyme, salt and pepper.
Cook uncovered for 1.5 to 2 hours, stirring every 10 to 15 minutes, until the onions are deeply caramelized and dark amber in color.
Taste and adjust seasoning if necessary then remove from the heat and let cool slightly before transferring to a clean jar.