Start with sautéing the whole spices, diced onions, and ginger in oil.
Add the pitted apricots along with the ground spices and vinegar. Cover and cook until the apricots are softened.
Once done, then add brown sugar and saute to thicken the chutney.