Heat oil in a pot over medium heat. Saute the onion until for 5 to 8 minutes until translucent. Add in the garlic and stir together. Add the tomato purée, brown sugar, vinegar, tomato paste, salt, mustard, cloves, allspice, red pepper flakes and cayenne pepper and stir to combine. Increase heat to high and bring to a boil, then reduce heat to low and simmer, stirring occasionally, for 45 to 60 minutes until it is thick like ketchup.
Using an immersion blender, food processor or blender, puree the mixture until smooth.
Adjust seasonings if needed and pour ketchup into a container and seal. Can be refrigerated for up to 1 month.
Notes
You can safely keep this for up to a month - make sure it's a container that seals really well, and store it in a cold part of the fridge, not the door.